Skip to content

Commit

Permalink
fix: set error message to empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
aalemayhu committed Mar 2, 2024
1 parent b3e208d commit edd5417
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/forms/NewPasswordForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function NewPasswordForm({ setErrorMessage }: Props) {

const handleSubmit = async (event: SyntheticEvent) => {
event.preventDefault();
setErrorMessage(null);
setErrorMessage('');
setLoading(true);

try {
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function RegisterForm({ setErrorMessage }: Props) {

const handleSubmit = async (event: SyntheticEvent) => {
event.preventDefault();
setErrorMessage(null);
setErrorMessage('');
setLoading(true);

try {
Expand Down

0 comments on commit edd5417

Please sign in to comment.