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
This commit is contained in:
Christel Westerberg
2025-11-14 12:40:16 +00:00
parent f8dee7eb7f
commit 9260cc0f81

View File

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