diff --git a/src/app/find-properties/[[...opa_id]]/page.tsx b/src/app/find-properties/[[...opa_id]]/page.tsx index 3449962a..7c29d68f 100644 --- a/src/app/find-properties/[[...opa_id]]/page.tsx +++ b/src/app/find-properties/[[...opa_id]]/page.tsx @@ -288,7 +288,7 @@ const MapPage = ({ params }: MapPageProps) => { ) : currentView === 'filter' ? ( - + ) : ( void; -} +const FilterView: FC = () => { + const { dispatch } = useFilter(); + + const onResetButtonPressed = () => { + dispatch({ + type: 'CLEAR_DIMENSIONS', + property: 'reset', + dimensions: [], + }); + }; -const FilterView: FC = ({ updateCurrentView }) => { return ( {/* Add ID to the close button */} } + label={'Reset'} + aria-label="Reset filters" id="close-filter-button" // Add an ID to this button - onPress={() => { - updateCurrentView('filter'); - }} + onPress={onResetButtonPressed} />