From f2757ad875e9472ba70d0dce221f0d3977c63fcd Mon Sep 17 00:00:00 2001 From: Antoine M Date: Mon, 10 Jun 2024 09:38:01 +0200 Subject: [PATCH] displaying behaviour sing on top of cover --- src/components/game/GameAnswerExplanation.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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' />
-
+