Skip to content

Commit

Permalink
fixed search defaulting to bible when on bible page
Browse files Browse the repository at this point in the history
  • Loading branch information
okeino committed Jan 4, 2024
1 parent 44ea08d commit 380981b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/organisms/searchResults.filters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -79,7 +79,7 @@ export const filters: Record<string, EntityFilter> = {
),
document: GetSearchSeriesDocument,
},
bible: {
bibles: {
heading: (
<FormattedMessage id="search__bibleBooksHeading" defaultMessage="Bible" />
),
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/searchResults.useResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 380981b

Please sign in to comment.