Update app/(auth)/sign-in/page.tsx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
cf6bfbc6eb
commit
8ba616a444
|
|
@ -28,7 +28,13 @@ const SignIn = () => {
|
|||
const onSubmit = async (data: SignInFormData) => {
|
||||
try {
|
||||
const result = await signInWithEmail(data);
|
||||
if(result.success) router.push('/');
|
||||
if (result.success) {
|
||||
router.push('/');
|
||||
return;
|
||||
}
|
||||
toast.error('Sign in failed', {
|
||||
description: result.error ?? 'Invalid email or password.',
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
toast.error('Sign in failed', {
|
||||
|
|
|
|||
Loading…
Reference in New Issue