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} /> );