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.
This commit is contained in:
jubnl
2026-04-03 17:04:18 +02:00
parent cfdbf9235f
commit 8dd22ab8a3

View File

@@ -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)}