From 9c7a447e4e7f8a0f6bdfc8539531e1defc710944 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Thu, 12 Dec 2024 18:01:08 +0100 Subject: [PATCH] =?UTF-8?q?Structure=20de=20d=C3=A9fi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/app/(tabs)/_layout.tsx | 4 ++-- client/app/(tabs)/challenges.tsx | 32 +++++++++++++++++++++++++++--- client/components/GameProvider.tsx | 2 +- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/client/app/(tabs)/_layout.tsx b/client/app/(tabs)/_layout.tsx index 8d4e7a3..2df0456 100644 --- a/client/app/(tabs)/_layout.tsx +++ b/client/app/(tabs)/_layout.tsx @@ -25,8 +25,8 @@ export default function TabLayout() { , }} /> diff --git a/client/app/(tabs)/challenges.tsx b/client/app/(tabs)/challenges.tsx index 3a1c71b..e85670d 100644 --- a/client/app/(tabs)/challenges.tsx +++ b/client/app/(tabs)/challenges.tsx @@ -1,9 +1,35 @@ -import { Surface, Text } from 'react-native-paper' +import { FontAwesome6 } from '@expo/vector-icons' +import { View } from 'react-native' +import { Appbar, Button, Card, Surface, Text } from 'react-native-paper' export default function ChallengesScreen() { return ( - - Ici on aura la gestion des challenges + + + + + + + + Titre + + + + Description + + Récompense : 500 + + + + + + + + ) } diff --git a/client/components/GameProvider.tsx b/client/components/GameProvider.tsx index 2df79ab..97e3c42 100644 --- a/client/components/GameProvider.tsx +++ b/client/components/GameProvider.tsx @@ -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(() => {