diff --git a/src/components/game/GameAnswerExplanation.jsx b/src/components/game/GameAnswerExplanation.jsx index 70a8571..6f447e8 100644 --- a/src/components/game/GameAnswerExplanation.jsx +++ b/src/components/game/GameAnswerExplanation.jsx @@ -9,7 +9,7 @@ import Loading from "../animations/Loading"; export default function GameAnwerExplanation({ questionId }) { useEffect(() => { document.querySelector("dialog").scrollTo(0, 0); - },[]); + }, []); const { answers, contextGameDatas, setCurrentGameModal, checkIfGameIsComplete } = useGame(); const { screensTranslations } = useUser(); @@ -21,10 +21,11 @@ export default function GameAnwerExplanation({ questionId }) { const answerExplanation = contextGameDatas.gameObjects[questionId].attrs.objectBehaviourDescription ?? "Pas d'explication pour cette question"; + const answerBehaviour = answer.correctAnswer ?? ""; const objectPictureUrl = contextGameDatas.gameObjects[questionId].attrs.objectPictureUrl; return ( -
+
{answer.userAnsweredCorrectly === true && ( <> @@ -70,7 +71,8 @@ export default function GameAnwerExplanation({ questionId }) { className='continue-game cta cta--construction cta--round cta--button-icon cta--next' />
-
+