From 05d3cd2042c4b965595fab2dd302dcf6b2c23caf Mon Sep 17 00:00:00 2001 From: "Mr. Algorithm" <11aravipratapsingh@gmail.com> Date: Sat, 4 Oct 2025 01:04:25 +0530 Subject: [PATCH] Update app/(auth)/sign-up/page.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- app/(auth)/sign-up/page.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/(auth)/sign-up/page.tsx b/app/(auth)/sign-up/page.tsx index 741df70..8368cc1 100644 --- a/app/(auth)/sign-up/page.tsx +++ b/app/(auth)/sign-up/page.tsx @@ -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', {