diff --git a/src/components/AuthPages/Login/index.jsx b/src/components/AuthPages/Login/index.jsx index 39a59b7..12642ea 100644 --- a/src/components/AuthPages/Login/index.jsx +++ b/src/components/AuthPages/Login/index.jsx @@ -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() { Remember Me @@ -128,6 +133,7 @@ export default function Login() { )} + {loginError &&

Invalid Credential

} ); -} +} \ No newline at end of file