Skip to content

Commit

Permalink
fix: reset text field when resetting answer
Browse files Browse the repository at this point in the history
  • Loading branch information
swouf committed Jun 19, 2024
1 parent b46690d commit ad2b92c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/question-view/QuestionView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ const QuestionView = (): JSX.Element => {
<Button
disabled={!userAnswer}
variant="outlined"
onClick={() => deleteAnswer()}
onClick={() => {
setAnswer('');
deleteAnswer();
}}
startIcon={<ReplayIcon />}
data-cy={RESET_BTN_CY}
>
Expand Down

0 comments on commit ad2b92c

Please sign in to comment.