@sonic-equipment/ui 197.0.0 → 198.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -142,7 +142,7 @@ function AlgoliaSearchProvider({ children, searchClient: _searchClient, }) {
|
|
|
142
142
|
window?.removeEventListener('touchmove', onTouchMove);
|
|
143
143
|
};
|
|
144
144
|
}, [getEnvironmentProps, state.isOpen]);
|
|
145
|
-
const
|
|
145
|
+
const globalSearchContextValue = useMemo(() => ({
|
|
146
146
|
autocomplete,
|
|
147
147
|
formRef,
|
|
148
148
|
inputRef,
|
|
@@ -163,7 +163,12 @@ function AlgoliaSearchProvider({ children, searchClient: _searchClient, }) {
|
|
|
163
163
|
setState,
|
|
164
164
|
state,
|
|
165
165
|
]);
|
|
166
|
-
|
|
166
|
+
const insightsProviderValue = useMemo(() => {
|
|
167
|
+
return {
|
|
168
|
+
index: productsIndexName,
|
|
169
|
+
};
|
|
170
|
+
}, [productsIndexName]);
|
|
171
|
+
return (jsx(AlgoliaInsightsProvider, { value: insightsProviderValue, children: jsx(GlobalSearchContext.Provider, { value: globalSearchContextValue, children: typeof children === 'function' ? children(autocomplete) : children }) }));
|
|
167
172
|
}
|
|
168
173
|
|
|
169
174
|
export { AlgoliaSearchProvider, GlobalSearchContext };
|