Skip to content

Commit 3d0ad9f

Browse files
committed
manage reset
1 parent 877afdf commit 3d0ad9f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

components/QuizForm.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const QuizForm: FC<Props> = ({
2222
totalQuestions,
2323
link,
2424
}) => {
25-
const { register, handleSubmit, reset, watch } = useForm();
25+
const { register, handleSubmit, watch } = useForm();
2626
const [showCorrectAnswer, setShowCorrectAnswer] = useState<{
2727
[key: number]: boolean;
2828
}>({});
@@ -141,7 +141,6 @@ const QuizForm: FC<Props> = ({
141141
} else {
142142
handleNextQuestion(currentQuestionIndex + 1);
143143
}
144-
reset();
145144
};
146145

147146
const isOptionCheckedWithoutReveal = (
@@ -211,7 +210,6 @@ const QuizForm: FC<Props> = ({
211210
value={currentQuestionIndex}
212211
onChange={(e) => {
213212
handleNextQuestion(Number(e.target.value));
214-
reset();
215213
}}
216214
/>
217215
<p className="text-white text-md font-semibold text-center w-[40px] rounded-r-md border bg-slate-800 border-slate-700">
@@ -323,7 +321,6 @@ const QuizForm: FC<Props> = ({
323321
recordShowCorrectAnswer();
324322
setIsThinking(true);
325323
explainCorrectAnswer();
326-
reset();
327324
}}
328325
>
329326
{isThinking ? "Thinking..." : "Explain"}

0 commit comments

Comments
 (0)