Structure de défi

This commit is contained in:
2024-12-12 18:01:08 +01:00
parent e623dad81f
commit 9c7a447e4e
3 changed files with 32 additions and 6 deletions

View File

@ -43,7 +43,7 @@ export default function GameProvider({ children }: { children: ReactNode }) {
queryFn: () => fetch(`${process.env.EXPO_PUBLIC_TRAINTRAPE_MOI_SERVER}/trains/?playerId=${game.playerId}&size=10000`, {
headers: { "Authorization": `Bearer ${auth.token}` }}
).then(resp => resp.json()),
enabled: isAuthValid(auth) && !game.playerId,
enabled: isAuthValid(auth) && !!game.playerId,
refetchInterval: 5000,
})
useEffect(() => {