Update app/(auth)/sign-in/page.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Mr. Algorithm 2025-10-04 01:04:05 +05:30 committed by GitHub
parent cf6bfbc6eb
commit 8ba616a444
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -28,7 +28,13 @@ const SignIn = () => {
const onSubmit = async (data: SignInFormData) => { const onSubmit = async (data: SignInFormData) => {
try { try {
const result = await signInWithEmail(data); 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) { } catch (e) {
console.error(e); console.error(e);
toast.error('Sign in failed', { toast.error('Sign in failed', {