diff --git a/components/auth/auth-form.tsx b/components/auth/auth-form.tsx index fe4e62f9d1..038a34dd6d 100644 --- a/components/auth/auth-form.tsx +++ b/components/auth/auth-form.tsx @@ -63,6 +63,10 @@ export const AuthForm = ({ type }: { type: string }) => { if (type === "sign-up") { const newUser = await createNewUser(data); + if (!newUser.errors) { + router.push("/sign-in"); + } + if (newUser?.errors && newUser.errors.length > 0) { newUser.errors.forEach((error: ApiError) => { const errorMessage = error.detail; @@ -109,8 +113,8 @@ export const AuthForm = ({ type }: { type: string }) => { {/* Auth Form */}