Update app/(auth)/sign-up/page.tsx
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
8ba616a444
commit
05d3cd2042
|
|
@ -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', {
|
||||
|
|
|
|||
Loading…
Reference in New Issue