From 21a71697be89e1bb8634cfca96fef891ca40d66d Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 24 Mar 2026 21:52:23 +0100 Subject: [PATCH] Fix route line remaining after place deletion (store timing) --- client/src/pages/TripPlannerPage.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/pages/TripPlannerPage.jsx b/client/src/pages/TripPlannerPage.jsx index 5e200c9..a02a32f 100644 --- a/client/src/pages/TripPlannerPage.jsx +++ b/client/src/pages/TripPlannerPage.jsx @@ -228,7 +228,8 @@ export default function TripPlannerPage() { try { await tripStore.deletePlace(tripId, placeId) if (selectedPlaceId === placeId) setSelectedPlaceId(null) - updateRouteForDay(selectedDayId) + // Delay route update to ensure store has propagated + setTimeout(() => updateRouteForDay(selectedDayId), 50) toast.success(t('trip.toast.placeDeleted')) } catch (err) { toast.error(err.message) } }, [tripId, tripStore, toast, selectedPlaceId])