Skip to content

Commit

Permalink
manage reset
Browse files Browse the repository at this point in the history
  • Loading branch information
cbvora committed Jun 14, 2024
1 parent 877afdf commit 3d0ad9f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions components/QuizForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const QuizForm: FC<Props> = ({
totalQuestions,
link,
}) => {
const { register, handleSubmit, reset, watch } = useForm();
const { register, handleSubmit, watch } = useForm();
const [showCorrectAnswer, setShowCorrectAnswer] = useState<{
[key: number]: boolean;
}>({});
Expand Down Expand Up @@ -141,7 +141,6 @@ const QuizForm: FC<Props> = ({
} else {
handleNextQuestion(currentQuestionIndex + 1);
}
reset();
};

const isOptionCheckedWithoutReveal = (
Expand Down Expand Up @@ -211,7 +210,6 @@ const QuizForm: FC<Props> = ({
value={currentQuestionIndex}
onChange={(e) => {
handleNextQuestion(Number(e.target.value));
reset();
}}
/>
<p className="text-white text-md font-semibold text-center w-[40px] rounded-r-md border bg-slate-800 border-slate-700">
Expand Down Expand Up @@ -323,7 +321,6 @@ const QuizForm: FC<Props> = ({
recordShowCorrectAnswer();
setIsThinking(true);
explainCorrectAnswer();
reset();
}}
>
{isThinking ? "Thinking..." : "Explain"}
Expand Down

0 comments on commit 3d0ad9f

Please sign in to comment.