Modify typo

This commit is contained in:
Vikas Nale 2025-06-09 11:46:00 +05:30
parent ab6316ef56
commit d37068b8d9

View File

@ -63,9 +63,13 @@ const LoginPage = () => {
} }
}; };
useEffect( () => useEffect(() => {
{ const otpSentTime = localStorage.getItem("otpSentTime"); const otpSentTime = localStorage.getItem("otpSentTime");
if (localStorage.getItem("otpUsername") && IsLoginWithOTP && now - Number(otpSentTime) < 10 * 60 * 1000) { if (
localStorage.getItem("otpUsername") &&
IsLoginWithOTP &&
now - Number(otpSentTime) < 10 * 60 * 1000
) {
navigate("/auth/login-otp"); navigate("/auth/login-otp");
} }
}, [IsLoginWithOTP]); }, [IsLoginWithOTP]);
@ -167,20 +171,17 @@ const LoginPage = () => {
className="btn btn-primary d-grid w-100 mb-2" className="btn btn-primary d-grid w-100 mb-2"
type="submit" type="submit"
> >
{loading {loading ? "Please Wait" : IsLoginWithOTP ? "Send OTP" : "Sign In"}
? "Please Wait"
: IsLoginWithOTP
? "Continue with OTP"
: "Sign In"}
</button> </button>
<div className="p-2">OR</div>
{!IsLoginWithOTP && ( {!IsLoginWithOTP && (
<button <button
aria-label="loginwithotp" aria-label="loginwithotp"
type="button" type="button"
onClick={() => setLoginWithOtp(true)} onClick={() => setLoginWithOtp(true)}
className="btn btn-primary w-100" className="btn btn-secondary w-100"
> >
login With OTP Login With OTP
</button> </button>
)} )}
</div> </div>