From 8dd22ab8a31d660927366d4a8e45dd398b494c89 Mon Sep 17 00:00:00 2001 From: jubnl Date: Fri, 3 Apr 2026 17:04:18 +0200 Subject: [PATCH] fix: deselect day when closing DayDetailPanel Closing the panel via the X button now calls handleSelectDay(null), clearing selectedDayId from the Zustand store and resetting the route. Fixes #356. --- client/src/pages/TripPlannerPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/pages/TripPlannerPage.tsx b/client/src/pages/TripPlannerPage.tsx index 47918bd..c2b962c 100644 --- a/client/src/pages/TripPlannerPage.tsx +++ b/client/src/pages/TripPlannerPage.tsx @@ -717,7 +717,7 @@ export default function TripPlannerPage(): React.ReactElement | null { reservations={reservations} lat={geoPlace?.lat} lng={geoPlace?.lng} - onClose={() => setShowDayDetail(null)} + onClose={() => { setShowDayDetail(null); handleSelectDay(null) }} onAccommodationChange={loadAccommodations} leftWidth={isMobile ? 0 : (leftCollapsed ? 0 : leftWidth)} rightWidth={isMobile ? 0 : (rightCollapsed ? 0 : rightWidth)}