diff --git a/web/components/contract-search.tsx b/web/components/contract-search.tsx index 6438a3aa..c1e63175 100644 --- a/web/components/contract-search.tsx +++ b/web/components/contract-search.tsx @@ -107,7 +107,7 @@ export function ContractSearch(props: { const [filter, setFilter] = useState( querySortOptions?.defaultFilter ?? 'open' ) - const pillsEnabled = !additionalFilter + const pillsEnabled = !additionalFilter && !query const [pillFilter, setPillFilter] = useState(undefined) @@ -126,7 +126,7 @@ export function ContractSearch(props: { ? `groupLinks.slug:${additionalFilter.groupSlug}` : '', ] - let facetFilters = query + const facetFilters = query ? additionalFilters : [ ...additionalFilters, @@ -154,8 +154,6 @@ export function ContractSearch(props: { `uniqueBettorIds:${user.id}` : '', ].filter((f) => f) - // Hack to make Algolia work. - facetFilters = ['', ...facetFilters] const numericFilters = query ? []