Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from "react";
import { connectSortBy } from "react-instantsearch/connectors";
const SortBy = connectSortBy(({ items, currentRefinement, refine }) => (
<div>
<select value="{currentRefinement}"> {
e.preventDefault();
refine(e.target.value);
}}>
{items.map(item => (
<option value="{item.value}">
Sort by {item.label}
</option>
))}
</select>
<div>
<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"></svg></div></div>
/>
);
}
Hits.propTypes = {
hits: PropTypes.array.isRequired,
refine: PropTypes.func.isRequired,
hasMore: PropTypes.bool.isRequired,
};
const ConnectedHits = connectInfiniteHits(Hits);
const ConnectedStats = connectStats(({ nbHits }) => (
));
const ConnectedSortBy = connectSortBy(
({ refine, items, currentRefinement }) => {
const icon =
Platform.OS === 'ios' ? (
) : (