Merge branch 'login_michael' of MyFit/users-myfit into master

This commit is contained in:
2023-01-25 18:10:15 +00:00
committed by Gogs
+9 -3
View File
@@ -10,6 +10,10 @@ import AuthLayout from "../AuthLayout";
export default function Login() {
const [checked, setValue] = useState(false);
const [loginLoading, setLoginLoading] = useState(false);
//login error state
const [loginError, setLoginError] = useState(false);
const rememberMe = () => {
setValue(!checked);
};
@@ -36,7 +40,8 @@ export default function Login() {
setLoginLoading(false);
}, 2000);
} else {
toast.error("Invalid Credential");
// toast.error("Invalid Credential");
setLoginError(true)
}
}
};
@@ -103,7 +108,7 @@ export default function Login() {
</button>
<span
onClick={rememberMe}
className="text-base text-dark-gray dark:text-white"
className="text-base text-dark-gray dark:text-white"
>
Remember Me
</span>
@@ -128,6 +133,7 @@ export default function Login() {
)}
</button>
</div>
{loginError && <p class="text-center text-red-600 pb-4">Invalid Credential</p>}
<a
href="#"
className="w-full border border-light-purple dark:border-[#5356fb29] rounded-[50px] h-[58px] flex justify-center bg-[#FAFAFA] dark:bg-[#11131F] items-center"
@@ -152,4 +158,4 @@ export default function Login() {
</AuthLayout>
</>
);
}
}