On récupère pour l'instant tous les trains sans se préoccuper de la pagination
This commit is contained in:
parent
bfc6069a87
commit
e623dad81f
@ -40,7 +40,7 @@ export default function GameProvider({ children }: { children: ReactNode }) {
|
||||
|
||||
const trainsQuery = useQuery({
|
||||
queryKey: ['get-trains', game.playerId, auth.token],
|
||||
queryFn: () => fetch(`${process.env.EXPO_PUBLIC_TRAINTRAPE_MOI_SERVER}/trains/?playerId=${game.playerId}`, {
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user