From df0058541e640069bfacff5ce1f9600ab68f3d4a Mon Sep 17 00:00:00 2001 From: "tomosa.sarkar" Date: Mon, 8 Dec 2025 16:41:30 +0530 Subject: [PATCH] fix: eMandate login page fix: reserver url --- src/app/eMandate/login/page/page.tsx | 7 +++++-- src/app/eMandate/otp_page/page.tsx | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/eMandate/login/page/page.tsx b/src/app/eMandate/login/page/page.tsx index 9287702..6066c2b 100644 --- a/src/app/eMandate/login/page/page.tsx +++ b/src/app/eMandate/login/page/page.tsx @@ -110,6 +110,7 @@ function LoginEmandate() { return; } try { + setIsLogging(true); const response = await fetch('/api/auth/login', { method: 'POST', headers: { @@ -134,9 +135,9 @@ function LoginEmandate() { localStorage.removeItem("mandate_token"); localStorage.clear(); sessionStorage.clear(); + setIsLogging(false); return; } - setIsLogging(true); if (response.ok) { // console.log(data); const token = data.token; @@ -150,6 +151,7 @@ function LoginEmandate() { message: "Please go to Internet Banking, set your credentials, and then try logging in here again.", autoClose: 5000, }); + setIsLogging(false); } else { console.log("Start to validate soft tech data"); @@ -181,6 +183,7 @@ function LoginEmandate() { message: "Failed to validate.Please try again later.", autoClose: 5000, }); + setIsLogging(false); } } } @@ -204,6 +207,7 @@ function LoginEmandate() { message: "Internal Server Error,Please try again Later", autoClose: 5000, }); + setIsLogging(false); return; } } @@ -451,4 +455,3 @@ export default function Login() { ); } - diff --git a/src/app/eMandate/otp_page/page.tsx b/src/app/eMandate/otp_page/page.tsx index d2adf05..b4cb0a5 100644 --- a/src/app/eMandate/otp_page/page.tsx +++ b/src/app/eMandate/otp_page/page.tsx @@ -128,7 +128,7 @@ export default function VerifyOtpPage() { if (success) { const encoded_data = localStorage.getItem("Validate_data"); const res = await fetch( - `https://apiemandate.kccb.in:9035/Emandate/auth-cbs-resp?data=${encoded_data}`, + `https://apiemandate.kccb.in:9035/EMandate/auth-cbs-resp?data=${encoded_data}`, { method: "POST", headers: {