Update app/lib/api.ts
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 2m54s

This commit is contained in:
Nathan 2025-09-12 20:48:25 +02:00
parent d9b35d91e8
commit 598b7a7f05

View file

@ -195,11 +195,9 @@ interface CollePayload {
export const useColles = (startDate: DateTime) => {
// Check if the start date is the current week
// This is used to determine if the data is "actual" or not
const isActual = DateTime.now()
.startOf("week")
.equals(startDate.startOf("week"));
const isFuture = startDate.isAfter(DateTime.now());
const options = isActual
const options = isFuture
? {
refetchOnWindowFocus: true,
refetchOnReconnect: true,