Skip to content

Commit

Permalink
updates error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pragyakallanagoudar committed May 18, 2024
1 parent 3fcd2be commit 6a59c2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/(auth)/forgot-password/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function ForgotPassword() {
const handleForgotPassword = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (!isEmail(email)) {
setEmailError('Could not find email.');
setEmailError('Email not found.');
return;
}
const { error } = await supabase.auth.resetPasswordForEmail(email, {
Expand Down
4 changes: 2 additions & 2 deletions src/app/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export default function Login() {
return;
}

setEmailError(validEmail(email) ? '' : 'Invalid email.');
setPasswordError(password !== '' ? '' : 'Invalid password.');
setEmailError(validEmail(email) ? '' : 'Email not found.');
setPasswordError(password !== '' ? '' : 'Password is incorrect.');
if (!validEmail(email) || password === '') {
setErrorMessage('');
return;
Expand Down

0 comments on commit 6a59c2b

Please sign in to comment.