Stabilité téléchargement des données
This commit is contained in:
@@ -39,13 +39,14 @@ export default function GeolocationProvider({ children }: { children: ReactNode
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
}).then(resp => resp.json()),
|
||||
initialData: [],
|
||||
enabled: isAuthValid(auth),
|
||||
refetchInterval: 5000,
|
||||
})
|
||||
useEffect(() => {
|
||||
if (lastLocationsQuery.isSuccess && lastLocationsQuery.data)
|
||||
setLastPlayerLocations(lastLocationsQuery.data)
|
||||
}, [lastLocationsQuery.status, lastLocationsQuery.dataUpdatedAt, auth])
|
||||
}, [lastLocationsQuery.status, lastLocationsQuery.dataUpdatedAt])
|
||||
|
||||
return <>
|
||||
{children}
|
||||
|
Reference in New Issue
Block a user