From 45a9950ad37a4e9c432fab3d0f4152b21358381f Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Sat, 22 Mar 2025 13:49:12 +0800 Subject: [PATCH] fix(credentials-sign-in-form): redirect to dashboard after successful sign-in --- src/components/credentials-sign-in-form.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/credentials-sign-in-form.tsx b/src/components/credentials-sign-in-form.tsx index a597891..07ecf4f 100644 --- a/src/components/credentials-sign-in-form.tsx +++ b/src/components/credentials-sign-in-form.tsx @@ -40,14 +40,14 @@ export function CredentialsSignInForm() { const onSubmit = (data: CredentialsSignInFormValues) => { startTransition(async () => { const result = await signInWithCredentials(data); - + if (result?.error) { toast.error("Sign In Failed", { description: result.error, }); } else { toast.success("Signed In Successfully"); - router.push("/dashboard"); + router.push("/"); } }); };