diff --git a/client/src/components/QuestionsDisplay/ShortAnswerQuestionDisplay/ShortAnswerQuestionDisplay.tsx b/client/src/components/QuestionsDisplay/ShortAnswerQuestionDisplay/ShortAnswerQuestionDisplay.tsx index f415679..1dc02b5 100644 --- a/client/src/components/QuestionsDisplay/ShortAnswerQuestionDisplay/ShortAnswerQuestionDisplay.tsx +++ b/client/src/components/QuestionsDisplay/ShortAnswerQuestionDisplay/ShortAnswerQuestionDisplay.tsx @@ -13,15 +13,17 @@ interface Props { } const ShortAnswerQuestionDisplay: React.FC = (props) => { + const { question, showAnswer, handleOnSubmitAnswer, passedAnswer } = props; - const [answer, setAnswer] = useState(passedAnswer || ' '); + const [answer, setAnswer] = useState(passedAnswer || ''); useEffect(() => { if (passedAnswer !== undefined) { setAnswer(passedAnswer); } }, [passedAnswer]); - + console.log("Answer" , answer); + return (
diff --git a/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx b/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx index bdb48b9..d42d708 100644 --- a/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx +++ b/client/src/components/TeacherModeQuiz/TeacherModeQuiz.tsx @@ -22,8 +22,6 @@ const TeacherModeQuiz: React.FC = ({ const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = useState(false); const [answer, setAnswer] = useState(''); - console.log("Answer" , answer); - useEffect(() => { // Close the feedback dialog when the question changes