From fc623582e00cb10cef99ccde534fead19f2aad6a Mon Sep 17 00:00:00 2001 From: JubaAzul <118773284+JubaAzul@users.noreply.github.com> Date: Wed, 5 Feb 2025 19:45:55 -0500 Subject: [PATCH] =?UTF-8?q?[Rythme=20enseignant]=20Fen=C3=AAtre=20de=20r?= =?UTF-8?q?=C3=A9troaction=20reste=20ouverte=20pour=20les=20prochaines=20q?= =?UTF-8?q?uestions=20si=20l'=C3=A9tudiant=20ne=20l'enl=C3=A8ve=20pas=20Fi?= =?UTF-8?q?xes=20#222?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx b/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx index ae2d382..dea9af3 100644 --- a/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx +++ b/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx @@ -26,8 +26,11 @@ const TeacherModeQuiz: React.FC = ({ const [feedbackMessage, setFeedbackMessage] = useState(''); useEffect(() => { + // Close the feedback dialog when the question changes + handleFeedbackDialogClose(); setIsAnswerSubmitted(false); - }, [questionInfos]); + + }, [questionInfos.question]); const handleOnSubmitAnswer = (answer: string | number | boolean) => { const idQuestion = Number(questionInfos.question.id) || -1;