diff --git a/client/src/components/QuestionsDisplay/MultipleChoiceQuestionDisplay/MultipleChoiceQuestionDisplay.tsx b/client/src/components/QuestionsDisplay/MultipleChoiceQuestionDisplay/MultipleChoiceQuestionDisplay.tsx index f9ade9f..2fb187b 100644 --- a/client/src/components/QuestionsDisplay/MultipleChoiceQuestionDisplay/MultipleChoiceQuestionDisplay.tsx +++ b/client/src/components/QuestionsDisplay/MultipleChoiceQuestionDisplay/MultipleChoiceQuestionDisplay.tsx @@ -12,10 +12,9 @@ interface Props { } const MultipleChoiceQuestionDisplay: React.FC = (props) => { - const { question, showAnswer, handleOnSubmitAnswer } = props; const [answer, setAnswer] = useState(); - + useEffect(() => { setAnswer(undefined); }, [question]); @@ -24,7 +23,6 @@ const MultipleChoiceQuestionDisplay: React.FC = (props) => { setAnswer(choice); }; - const alpha = Array.from(Array(26)).map((_e, i) => i + 65); const alphabet = alpha.map((x) => String.fromCharCode(x)); return ( @@ -37,25 +35,22 @@ const MultipleChoiceQuestionDisplay: React.FC = (props) => { const selected = answer === choice.formattedText.text ? 'selected' : ''; return (
- - {choice.formattedFeedback && showAnswer && ( + {choice.formattedFeedback && showAnswer && (
- {choice.isCorrect ? '✅' : '❌'}
)} + +
); })} diff --git a/server/package-lock.json b/server/package-lock.json index 9b44c36..3d4122a 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -31,7 +31,7 @@ "supertest": "^6.3.4" }, "engines": { - "node": "18.x" + "node": "20.x" } }, "node_modules/@ampproject/remapping": {