Afifchage de l'historique des mouvements de point
This commit is contained in:
@ -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)
|
||||
|
@ -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}
|
||||
|
Reference in New Issue
Block a user