Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d6eadbb46b |
@@ -9,6 +9,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);
|
||||
};
|
||||
@@ -35,7 +39,8 @@ export default function Login() {
|
||||
setLoginLoading(false);
|
||||
}, 2000);
|
||||
} else {
|
||||
toast.error("Invalid Credential");
|
||||
// toast.error("Invalid Credential");
|
||||
setLoginError(true)
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -102,7 +107,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>
|
||||
@@ -127,6 +132,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"
|
||||
@@ -151,4 +157,4 @@ export default function Login() {
|
||||
</AuthLayout>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user