diff --git a/app/UserPanel/(Controller)/ControllerDashboard/layout.tsx b/app/UserPanel/(Controller)/ControllerDashboard/layout.tsx index 2f29e0d..a680a1c 100644 --- a/app/UserPanel/(Controller)/ControllerDashboard/layout.tsx +++ b/app/UserPanel/(Controller)/ControllerDashboard/layout.tsx @@ -15,7 +15,7 @@ export default function RootLayout({ return ( <> -
{children}
+
{children}
); } diff --git a/components/Login.tsx b/components/Login.tsx index 85e19c9..bf30b74 100644 --- a/components/Login.tsx +++ b/components/Login.tsx @@ -58,16 +58,14 @@ export default function Login() { const loginMutation = useMutation({ mutationFn: loginStaff, - onSuccess: (res) => {}, + onSuccess: (res) => { + router.push("/Verify"); + localStorage.setItem("verificationToken", res.verificationToken); + }, onError: (err: any | string) => { - if (err.response.status == 428) { - console.log(useData); - router.push("/Verify"); - } else { - toast("مشکلی در ارسال درخواست به وجود آمد.", { - className: "!bg-red-500 !text-white", - }); - } + toast("مشکلی در ارسال درخواست به وجود آمد.", { + className: "!bg-red-500 !text-white", + }); }, }); @@ -97,22 +95,22 @@ export default function Login() { : null; return ( -
+
-
+
icon -

+

ورود به پنل کاربری

)} /> -
+
( - + {/* رمز عبور */} @@ -176,7 +174,7 @@ export default function Login() { )} /> {isLoading ? ( -
+
) : ( -
+
icon refetch()} color="#003778" />
)}
-
+