Skip to content

Commit

Permalink
[Test]/#116- isAnswerSelected 전달 props 전달
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaem03 authored Nov 16, 2024
2 parents 6965db9 + 885d1f2 commit bc17d52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/components/testQuestion/TestQuestion.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export const TestQuestion = ({
<S.AnswerBox
key={index}
onClick={() => handleSelect(index)}
$isSelected={selectedAnswer[currentQuestion] === index}
$isSelected={
isAnswerSelected && selectedAnswer[currentQuestion] === index
}
$isAnswerCorrect={
isAnswerCorrect && selectedAnswer[currentQuestion] === index
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/nuguTest/MakeNuguTest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const MakeNuguTest = () => {
handleAnswerSelect={handleAnswerSelect}
handleNextQuestion={handleNextQuestion}
TEST_QUESTION={TEST_QUESTION}
isAnswerinCorrect={true}
isAnswerCorrect={true}
isAnswerSelected={isAnswerSelected}
/>
</>
Expand Down

0 comments on commit bc17d52

Please sign in to comment.