From 9260cc0f812b182c13ffa89bc6b0aaaa027ef245 Mon Sep 17 00:00:00 2001 From: Christel Westerberg Date: Fri, 14 Nov 2025 12:40:16 +0000 Subject: [PATCH] Merged in fix/handle-past-logic (pull request #3161) fix: Update logic for identifying past stays * fix: Update logic for identifying past stays Approved-by: Erik Tiekstra --- apps/scandic-web/providers/MyStay.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/scandic-web/providers/MyStay.tsx b/apps/scandic-web/providers/MyStay.tsx index 795101d50..d853a0aba 100644 --- a/apps/scandic-web/providers/MyStay.tsx +++ b/apps/scandic-web/providers/MyStay.tsx @@ -95,7 +95,7 @@ export default function MyStayProvider({ // Following the API logic for determining if booking is in the past. // This is the same logic as used for separating stays in /future and /past endpoints on the API const now = dt() - const isPastBooking = dt(data.booking.checkInDate).isBefore(now, "day") + const isPastBooking = dt(data.booking.checkOutDate).isBefore(now, "day") const hasInvalidatedQueryAndRefetched = (isFetchedAfterMount && data) ||