From ac178ea6d40ecc3a206598060cc7763eb6d596ba Mon Sep 17 00:00:00 2001 From: Bodhish Thomas Date: Tue, 7 Jan 2025 01:37:15 +0530 Subject: [PATCH] Implement immediate redirection after successful login --- src/components/Auth/Login.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/Auth/Login.tsx b/src/components/Auth/Login.tsx index fa2df3f0c17..a7f9018dce5 100644 --- a/src/components/Auth/Login.tsx +++ b/src/components/Auth/Login.tsx @@ -103,6 +103,7 @@ const Login = (props: LoginProps) => { }, onSuccess: ({ res }) => { setCaptcha(res?.status === 429); + window.location.href = "/"; }, }); @@ -160,10 +161,7 @@ const Login = (props: LoginProps) => { createdAt: new Date().toISOString(), }; localStorage.setItem(CarePatientTokenKey, JSON.stringify(tokenData)); - Notification.Success({ msg: t("verify_otp_success_login") }); - setTimeout(() => { - window.location.href = "/patient/home"; - }, 200); + window.location.href = "/patient/home"; } },