From 598b7a7f05cc5ca17994f3c0dc2aae36d8316445 Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 12 Sep 2025 20:48:25 +0200 Subject: [PATCH] Update app/lib/api.ts --- app/lib/api.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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,