Skip to content

Commit

Permalink
removes punctuation from email/password error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pragyakallanagoudar committed May 18, 2024
1 parent af97a10 commit f9724b0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 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('Email not found.');
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 @@ -41,8 +41,8 @@ export default function Login() {
return;
}

setEmailError(validEmail(email) ? '' : 'Email not found.');
setPasswordError(password !== '' ? '' : 'Password is incorrect.');
setEmailError(validEmail(email) ? '' : 'Email not found');
setPasswordError(password !== '' ? '' : 'Password is incorrect');
if (!validEmail(email) || password === '') {
setErrorMessage('');
return;
Expand Down
4 changes: 2 additions & 2 deletions src/app/(auth)/signup/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ export default function SignUp() {
const handleSignUp = async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault();
if (!auth) return;
setEmailError(validEmail(email) ? '' : 'Invalid email.');
setPasswordError(password !== '' ? '' : 'Invalid password.');
setEmailError(validEmail(email) ? '' : 'Invalid email');
setPasswordError(password !== '' ? '' : 'Invalid password');
if (!validEmail(email) || password === '') {
setErrorMessage('');
return;
Expand Down

0 comments on commit f9724b0

Please sign in to comment.