diff --git a/frontend/src/components/pages/search/Search.tsx b/frontend/src/components/pages/search/Search.tsx index f55e2f6f4..a3721cd5e 100644 --- a/frontend/src/components/pages/search/Search.tsx +++ b/frontend/src/components/pages/search/Search.tsx @@ -62,6 +62,9 @@ export const SearchUI: React.FC = ({ language }) => { } = useTextFilter(); const { dateFilter, setDateFilter } = useDateFilter(); + const { searchBbox, setPoints, setSearchBbox, isNavigatedByBrowser } = useListAndMapContext(); + + const bboxState = bounds ?? searchBbox; const { searchResults, @@ -80,7 +83,7 @@ export const SearchUI: React.FC = ({ language }) => { { filtersState, textFilterState, - bboxState: bounds?.toBBoxString() ?? null, + bboxState: bboxState?.toBBoxString() ?? null, dateFilter, page, }, @@ -94,8 +97,6 @@ export const SearchUI: React.FC = ({ language }) => { language, ); - const { setPoints, setSearchBbox, isNavigatedByBrowser } = useListAndMapContext(); - useEffect(() => { if (mapResults) { setPoints(mapResults);