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