Afifchage de l'historique des mouvements de point

This commit is contained in:
2024-12-14 00:27:30 +01:00
parent 02304527d3
commit 3d50cee9a9
10 changed files with 102 additions and 19 deletions

View File

@ -96,7 +96,7 @@ export default function GameProvider({ children }: { children: ReactNode }) {
useEffect(() => {
const now = new Date().getTime()
const activeChallenge: ChallengeAction | undefined = challengeActions.challengeActions
const activeChallenge: ChallengeAction | undefined = challengeActions
.find(challengeAction => challengeAction.penaltyStart && challengeAction.penaltyEnd
&& challengeAction.penaltyStart <= now && now <= challengeAction.penaltyEnd)
if (!activeChallenge || !game.currentRunner)

View File

@ -45,7 +45,7 @@ export default function GeolocationProvider({ children }: { children: ReactNode
useEffect(() => {
if (lastLocationsQuery.isSuccess && lastLocationsQuery.data)
setLastPlayerLocations(lastLocationsQuery.data)
}, [lastLocationsQuery.status, lastLocationsQuery.dataUpdatedAt])
}, [lastLocationsQuery.status, lastLocationsQuery.dataUpdatedAt, auth])
return <>
{children}