From b5abf68d460353e9c487fa04e7bc5c9aa59d56da Mon Sep 17 00:00:00 2001 From: Antoine M Date: Wed, 21 Feb 2024 11:03:58 +0100 Subject: [PATCH] hadnling translations --- src/components/game/GameQuestion.jsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/game/GameQuestion.jsx b/src/components/game/GameQuestion.jsx index 8ac6013..0a51191 100644 --- a/src/components/game/GameQuestion.jsx +++ b/src/components/game/GameQuestion.jsx @@ -3,8 +3,17 @@ import anwserIconSafe from "../../assets/img/icons/anwser_icon_safe.svg"; import anwserIconUnsafe from "../../assets/img/icons/anwser_icon_unsafe.svg"; import { useGame } from "../../hooks/useGame"; +import { useUser } from "../../hooks/useUser"; +import Loading from "../animations/Loading"; + export default function GameQuestion({ questionId, correctAnswer }, ...props) { const { answerQuestion, contextGameDatas } = useGame(); + const { screensTranslations } = useUser(); + + if (!screensTranslations || !screensTranslations.tutorial) return ; + const currentScreenTranslations = screensTranslations.game; + + console.log("GameQuestion", currentScreenTranslations); const objectPictureUrl = contextGameDatas.gameObjects[questionId].attrs.objectPictureUrl; function handleAnswer(questionId, answer) { @@ -14,13 +23,10 @@ export default function GameQuestion({ questionId, correctAnswer }, ...props) { return (
-

Trouvé !

-

securisé ou risqué ?

+

{currentScreenTranslations.found}

+

{currentScreenTranslations.is_it_secure}

-

- Est-ce que la situation comporte un risque majeur ou identifiez vous un bon - comportement ? -

+

{currentScreenTranslations.is_it_secure_question}