import { Challenge } from "@/utils/features/challenges/challengesSlice" import { FontAwesome6 } from "@expo/vector-icons" import { View, ViewStyle } from "react-native" import { Button, Card, IconButton, MD3Colors, Surface, Text } from "react-native-paper" export type ChallengeCardProps = { challenge: Challenge | null, onSuccess?: () => void, onFail?: () => void, onDelete?: () => void, onEdit?: () => void, style?: ViewStyle, } export default function ChallengeCard({ challenge, onSuccess, onFail, onDelete, onEdit, style }: ChallengeCardProps) { return ( onEdit ? onEdit()} /> : <>} /> {challenge?.description} Récompense : {challenge?.reward} {onFail && } {onSuccess && } {onDelete && } ) }