From c37a7d621aa5e7e3791d07250ed85f4d7d69c182 Mon Sep 17 00:00:00 2001 From: chaem03 Date: Sat, 16 Nov 2024 10:47:17 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]-=20=EC=86=8C=EC=9C=A0=EC=9E=90=20?= =?UTF-8?q?=EC=97=AC=EB=B6=80=EC=97=90=20=EB=94=B0=EB=9D=BC=20answerBox=20?= =?UTF-8?q?=EB=B9=84=ED=99=9C=EC=84=B1=ED=99=94=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/testQuestion/TestQuestion.jsx | 7 ++++++- src/pages/nuguTest/ChallengerTest.jsx | 1 + src/pages/nuguTest/MakeNuguTest.jsx | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/testQuestion/TestQuestion.jsx b/src/components/testQuestion/TestQuestion.jsx index 0200126..43efd19 100644 --- a/src/components/testQuestion/TestQuestion.jsx +++ b/src/components/testQuestion/TestQuestion.jsx @@ -9,10 +9,15 @@ export const TestQuestion = ({ TEST_QUESTION, isAnswerCorrect, //정답이 맞는지-접속자 isAnswerSelected, //선택되었는지 - 소유자 + isUser, }) => { const handleSelect = (index) => { - if (selectedAnswer[currentQuestion] === null) { + if (isUser) { handleAnswerSelect(index); + } else { + if (selectedAnswer[currentQuestion] === null) { + handleAnswerSelect(index); + } } }; console.log("isAnswerinCorrect:", isAnswerCorrect); diff --git a/src/pages/nuguTest/ChallengerTest.jsx b/src/pages/nuguTest/ChallengerTest.jsx index 81350b8..ee999b5 100644 --- a/src/pages/nuguTest/ChallengerTest.jsx +++ b/src/pages/nuguTest/ChallengerTest.jsx @@ -90,6 +90,7 @@ export const ChallengerTest = () => { TEST_QUESTION={TEST_QUESTION} isAnswerCorrect={isAnswerCorrect} isAnswerSelected={isAnswerSelected} + isUser={false} /> )} diff --git a/src/pages/nuguTest/MakeNuguTest.jsx b/src/pages/nuguTest/MakeNuguTest.jsx index 9776379..9868460 100644 --- a/src/pages/nuguTest/MakeNuguTest.jsx +++ b/src/pages/nuguTest/MakeNuguTest.jsx @@ -28,6 +28,7 @@ export const MakeNuguTest = () => { TEST_QUESTION={TEST_QUESTION} isAnswerCorrect={true} isAnswerSelected={isAnswerSelected} + isUser={true} /> );