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