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:
@@ -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) ||
|
||||
|
||||
Reference in New Issue
Block a user