@@ -10,9 +10,9 @@ import type { ThemeSettings } from 'theme-settings';
10
10
import type { SearchSettings } from 'types' ;
11
11
import { getSearchClient } from 'utils/getSearchClient' ;
12
12
13
- import AlgoliaStateContextProvider from './components/AlgoliaStateContext' ;
14
13
import { Results } from './components/Results' ;
15
14
import { SearchBar } from './components/SearchBar' ;
15
+ import SearchStateContextProvider from './components/SearchStateContext' ;
16
16
import { Subtitle } from './components/Subtitle' ;
17
17
import { Title } from './components/Title' ;
18
18
import type { SearchState } from './types' ;
@@ -35,10 +35,7 @@ export function Search({ localeCode, settings, showDate, showSubtitle, storyCard
35
35
36
36
const searchClient = useMemo ( ( ) => getSearchClient ( settings ) , [ settings ] ) ;
37
37
38
- const filters =
39
- settings . searchBackend === 'algolia'
40
- ? `attributes.culture.code:${ localeCode } `
41
- : `attributes.culture.code=${ localeCode } ` ;
38
+ const filters = `attributes.culture.code=${ localeCode } ` ;
42
39
43
40
const scheduleUrlUpdate = useDebounce ( DEBOUNCE_TIME_MS , ( updatedSearchState : SearchState ) => {
44
41
if ( typeof window === 'undefined' ) {
@@ -62,7 +59,7 @@ export function Search({ localeCode, settings, showDate, showSubtitle, storyCard
62
59
createURL = { createUrl }
63
60
>
64
61
< Configure hitsPerPage = { 6 } filters = { filters } />
65
- < AlgoliaStateContextProvider >
62
+ < SearchStateContextProvider >
66
63
< Title />
67
64
< SearchBar />
68
65
< Subtitle />
@@ -71,7 +68,7 @@ export function Search({ localeCode, settings, showDate, showSubtitle, storyCard
71
68
showSubtitle = { showSubtitle }
72
69
storyCardVariant = { storyCardVariant }
73
70
/>
74
- </ AlgoliaStateContextProvider >
71
+ </ SearchStateContextProvider >
75
72
</ InstantSearch >
76
73
) ;
77
74
}
0 commit comments