Update app/lib/api.ts
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 2m54s
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 2m54s
This commit is contained in:
parent
d9b35d91e8
commit
598b7a7f05
1 changed files with 2 additions and 4 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue