diff --git a/src/pages/authentication/LoginPage.jsx b/src/pages/authentication/LoginPage.jsx index 9fd879b8..37400bf9 100644 --- a/src/pages/authentication/LoginPage.jsx +++ b/src/pages/authentication/LoginPage.jsx @@ -63,9 +63,13 @@ const LoginPage = () => { } }; - useEffect( () => - { const otpSentTime = localStorage.getItem("otpSentTime"); - if (localStorage.getItem("otpUsername") && IsLoginWithOTP && now - Number(otpSentTime) < 10 * 60 * 1000) { + useEffect(() => { + const otpSentTime = localStorage.getItem("otpSentTime"); + if ( + localStorage.getItem("otpUsername") && + IsLoginWithOTP && + now - Number(otpSentTime) < 10 * 60 * 1000 + ) { navigate("/auth/login-otp"); } }, [IsLoginWithOTP]); @@ -167,20 +171,17 @@ const LoginPage = () => { className="btn btn-primary d-grid w-100 mb-2" type="submit" > - {loading - ? "Please Wait" - : IsLoginWithOTP - ? "Continue with OTP" - : "Sign In"} + {loading ? "Please Wait" : IsLoginWithOTP ? "Send OTP" : "Sign In"} +