diff --git a/app/lib/api.ts b/app/lib/api.ts index f7a8767..134fd8b 100644 --- a/app/lib/api.ts +++ b/app/lib/api.ts @@ -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,