From 380981b43275c620018a63e8d96795cfa62e3dfd Mon Sep 17 00:00:00 2001 From: Okeino McGowan Date: Thu, 4 Jan 2024 10:00:18 -0500 Subject: [PATCH] fixed search defaulting to bible when on bible page --- src/components/organisms/searchResults.filters.tsx | 4 ++-- src/components/organisms/searchResults.useResults.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/organisms/searchResults.filters.tsx b/src/components/organisms/searchResults.filters.tsx index 15e11be0b..ff92753ce 100644 --- a/src/components/organisms/searchResults.filters.tsx +++ b/src/components/organisms/searchResults.filters.tsx @@ -27,7 +27,7 @@ export function useContextualFilterId(): EntityFilterId { const { pathname } = useRouter(); const filterIds = Object.keys(filters) as EntityFilterId[]; const filterId = filterIds.find((id) => - pathname.match(`/\\[language\\]\\/${id}/`) + pathname.match(`/\\[language\\]\\/${id}`) ); return filterId || 'all'; @@ -79,7 +79,7 @@ export const filters: Record = { ), document: GetSearchSeriesDocument, }, - bible: { + bibles: { heading: ( ), diff --git a/src/components/organisms/searchResults.useResults.tsx b/src/components/organisms/searchResults.useResults.tsx index 84e869bfc..1c2cb012b 100644 --- a/src/components/organisms/searchResults.useResults.tsx +++ b/src/components/organisms/searchResults.useResults.tsx @@ -112,7 +112,7 @@ function useQueryResults(filter: EntityFilterId, term: string) { series: useFilterQuery('series', vars, filter), books: useFilterQuery('books', vars, filter), egwbooks: useFilterQuery('egwbooks', vars, filter), - bible: useFilterQuery('bible', vars, filter), + bibles: useFilterQuery('bibles', vars, filter), sponsors: useFilterQuery('sponsors', vars, filter), conferences: useFilterQuery('conferences', vars, filter), music: useFilterQuery('music', vars, filter),