diff --git a/src/components/Search.js b/src/components/Search.js index 3e65b43e..231a6d00 100644 --- a/src/components/Search.js +++ b/src/components/Search.js @@ -22,6 +22,14 @@ export function Search(props) { const filtersAnchor = React.useRef(); + const defaultSort = [ + { + label: 'Featured', + value: config.index.indexName, + }, + ]; + const sorts = defaultSort.concat(config.sorts); + React.useEffect(() => { if (filtersAnchor.current && props.isFiltering) { filtersAnchor.current.scrollTop = 0; @@ -106,12 +114,12 @@ export function Search(props) {
- {config.sorts?.length > 0 && ( + {sorts.length > 1 && (
Sort by
)} diff --git a/src/config/index.js b/src/config/index.js index 5cb93c19..7e28aca5 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -26,10 +26,6 @@ const config = { hitComponent: Hit, googleAnalytics: false, sorts: [ - { - label: 'Featured', - value: 'instant_search', - }, { label: 'Price ascending', value: 'instant_search_price_asc',