Update app/(auth)/sign-up/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:25 +05:30 committed by GitHub
parent 8ba616a444
commit 05d3cd2042
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -36,7 +36,13 @@ const SignUp = () => {
const onSubmit = async (data: SignUpFormData) => {
try {
const result = await signUpWithEmail(data);
if(result.success) router.push('/');
if (result.success) {
router.push('/');
return;
}
toast.error('Sign up failed', {
description: result.error ?? 'We could not create your account.',
});
} catch (e) {
console.error(e);
toast.error('Sign up failed', {