mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
fix(credentials-sign-in-form): redirect to dashboard after successful sign-in
This commit is contained in:
parent
985da4f804
commit
45a9950ad3
@ -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("/");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user