diff --git a/src/components/JourneyCard.tsx b/src/components/JourneyCard.tsx index 1ca968c..f219bfb 100644 --- a/src/components/JourneyCard.tsx +++ b/src/components/JourneyCard.tsx @@ -12,17 +12,52 @@ type JourneyCardProps = { const JourneyCard = ({ journey }: JourneyCardProps) => { const averageRate = calculateAverageRating(journey.comments); + let phisicalDificulty = "facile"; + let cluesDificulty = "facile"; + + switch (journey.physicalDifficulty) { + case 1: + phisicalDificulty = "facile"; + break; + case 2: + phisicalDificulty = "intermédiaire"; + break; + case 3: + phisicalDificulty = "difficile"; + break; + default: + phisicalDificulty = "facile"; + break; + } + + switch (journey.cluesDifficulty) { + case 1: + cluesDificulty = "facile"; + break; + case 2: + cluesDificulty = "intermédiaire"; + break; + case 3: + cluesDificulty = "difficile"; + break; + default: + cluesDificulty = "facile"; + break; + } + return (
Facile
++ {phisicalDificulty} +
Intermédiaire
+{cluesDificulty}