Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
<div>
</div>
);
}
}
const VirtualSearchBox = connectSearchBox(() => null);
const VirtualRefinementList = connectRefinementList(() => null);
const connectAutoComplete = createConnector({
displayName: 'AutoComplete',
/*
We retrieve all the values needed:
- Current query
- Hits
- Facet values (given an array of attributes provided to the component)
To work properly, you need to use Virtual Widgets for the SearchBox and all the
facets you want the value of.
*/
getProvidedProps(props, state, search) {
const hits = search.results && search.results.bestbuy
? search.results.bestbuy.hits
: [];
const facets = props.attributes.reduce((acc, attributeName) => {
if (search.results && search.results.bestbuy) {