Compare commits

..

1 Commits

Author SHA1 Message Date
ChineseChikki 268e06c9a7 Invalid login message rectified 2023-01-25 12:45:09 +01:00
+9 -9
View File
@@ -10,7 +10,7 @@ export default function Login() {
const [checked, setValue] = useState(false);
const [loginLoading, setLoginLoading] = useState(false);
//login error state
//logIn error state
const [loginError, setLoginError] = useState(false);
const rememberMe = () => {
@@ -22,11 +22,13 @@ export default function Login() {
const handleEmail = (e) => {
setMail(e.target.value);
};
// password
const [password, setPassword] = useState("123456");
const handlePassword = (e) => {
setPassword(e.target.value);
};
const navigate = useNavigate();
const doLogin = () => {
if (email !== "" && password !== "") {
@@ -39,7 +41,6 @@ export default function Login() {
setLoginLoading(false);
}, 2000);
} else {
// toast.error("Invalid Credential");
setLoginError(true)
}
}
@@ -107,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>
@@ -121,9 +122,8 @@ export default function Login() {
<button
onClick={doLogin}
type="button"
className={`btn-login rounded-[50px] mb-6 text-xl text-white font-bold flex justify-center bg-purple items-center ${
loginLoading ? "active" : ""
}`}
className={`btn-login rounded-[50px] mb-6 text-xl text-white font-bold flex justify-center bg-purple items-center ${loginLoading ? "active" : ""
}`}
>
{loginLoading ? (
<div className="signup btn-loader"></div>
@@ -132,7 +132,7 @@ export default function Login() {
)}
</button>
</div>
{loginError && <p class="text-center text-red-600 pb-4">Invalid Credential</p>}
{loginError && <p className="text-center text-red-700 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"
@@ -145,7 +145,7 @@ export default function Login() {
</div>
<div className="signup-area flex justify-center">
<p className="sm:text-lg text-sm text-thin-light-gray font-normal">
Dontt have an aceount ?
Dont have an account ?
<a href="/signup" className="ml-2 text-dark-gray dark:text-white">
Sign up free
</a>
@@ -157,4 +157,4 @@ export default function Login() {
</AuthLayout>
</>
);
}
}