From 808b7f7a72d29a71d762a8944b3b127ea96b45de Mon Sep 17 00:00:00 2001 From: Maurice Date: Sun, 29 Mar 2026 15:27:56 +0200 Subject: [PATCH] fix: map pins update immediately when category filter is cleared --- client/src/pages/TripPlannerPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/pages/TripPlannerPage.tsx b/client/src/pages/TripPlannerPage.tsx index a02263d..778c7da 100644 --- a/client/src/pages/TripPlannerPage.tsx +++ b/client/src/pages/TripPlannerPage.tsx @@ -118,7 +118,7 @@ export default function TripPlannerPage(): React.ReactElement | null { const [mapCategoryFilter, setMapCategoryFilter] = useState('') - const mapPlaces = useCallback(() => { + const mapPlaces = useMemo(() => { return places.filter(p => { if (!p.lat || !p.lng) return false if (mapCategoryFilter && String(p.category_id) !== String(mapCategoryFilter)) return false @@ -376,7 +376,7 @@ export default function TripPlannerPage(): React.ReactElement | null { {activeTab === 'plan' && (