diff --git a/src/components/templates/Search/filterPrice.tsx b/src/components/templates/Search/filterPrice.tsx index e87c2c84c..f48064dd8 100644 --- a/src/components/templates/Search/filterPrice.tsx +++ b/src/components/templates/Search/filterPrice.tsx @@ -38,7 +38,7 @@ export default function FilterPrice({ const [priceSelections, setPriceSelections] = useState([]) const [serviceSelections, setServiceSelections] = useState([]) - const [clearSelected, setClearSeleted] = useState(false) + const [clearSelected, setClearSelected] = useState(false) async function applyPriceFilter(filterBy: string) { let urlLocation = await addExistingParamsToUrl(location, 'priceType') @@ -84,12 +84,12 @@ export default function FilterPrice({ // one already selected -> both selected await applyPriceFilter(FilterByPriceOptions.All) setPriceSelections(priceFilterItems.map((p) => p.value)) - setClearSeleted(false) + setClearSelected(false) } else { // none selected -> select await applyPriceFilter(value) setPriceSelections([value]) - setClearSeleted(false) + setClearSelected(false) } } } else { @@ -111,11 +111,11 @@ export default function FilterPrice({ if (serviceSelections.length) { await applyServiceFilter(undefined) setServiceSelections(serviceFilterItems.map((p) => p.value)) - setClearSeleted(false) + setClearSelected(false) } else { await applyServiceFilter(value) setServiceSelections([value]) - setClearSeleted(false) + setClearSelected(false) } } } @@ -133,7 +133,7 @@ export default function FilterPrice({ setServiceSelections([]) setPriceSelections([]) - setClearSeleted(true) + setClearSelected(true) setPriceType(undefined) setServiceType(undefined) navigate(urlLocation)