diff --git a/client/app/(tabs)/challenges.tsx b/client/app/(tabs)/challenges.tsx index 5369242..dafc085 100644 --- a/client/app/(tabs)/challenges.tsx +++ b/client/app/(tabs)/challenges.tsx @@ -3,10 +3,22 @@ import PenaltyBanner from '@/components/PenalyBanner' import { useChallengeActions } from '@/hooks/useChallengeActions' import { useChallenges } from '@/hooks/useChallenges' import { useGame } from '@/hooks/useGame' +import { FontAwesome6 } from '@expo/vector-icons' import { useMemo } from 'react' -import { Appbar, Surface } from 'react-native-paper' +import { View } from 'react-native' +import { Appbar, Banner, FAB, MD3Colors, Surface, Text } from 'react-native-paper' -export default function ChallengesScreen() { +function ChallengeScreenHeader() { + return <> + + + + + + +} + +function ChallengeScreenBody() { const game = useGame() const challengeActions = useChallengeActions() const challenges = useChallenges() @@ -21,14 +33,33 @@ export default function ChallengesScreen() { return challenges.challenges.find((challenge) => challenge.id === currentChallengeAction.challengeId) }, [currentChallengeAction, challenges]) + return <> + {currentChallenge && } + {!currentChallenge && game.currentRunner && <> + + Aucun défi en cours. + + + + + } + } + style={{ backgroundColor: MD3Colors.secondary30 }}> + Vous êtes poursuiveuse, et n'avez donc pas de défi à accomplir. + + +} + +export default function ChallengesScreen() { return ( - - - - - - {currentChallenge && } + + ) }