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( () =>
{ 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"}
</button>
<div className="p-2">OR</div>
{!IsLoginWithOTP && (
<button
aria-label="loginwithotp"
type="button"
onClick={() => setLoginWithOtp(true)}
className="btn btn-primary w-100"
className="btn btn-secondary w-100"
>
login With OTP
Login With OTP
</button>
)}
</div>