Compare commits

..

1 Commits

Author SHA1 Message Date
ChineseChikki 268e06c9a7 Invalid login message rectified 2023-01-25 12:45:09 +01:00
3 changed files with 13 additions and 11 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
<svg width="379" height="31" viewBox="0 0 379 31" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0,0 379,0" stroke="url(#paint0_linear_7_3645)" stroke-width="2" stroke-linecap="round"/>
<path d="M1 29.5C18.8333 21 68.4183 8.72179 121.5 18.5C178.5 29 365.5 43.5 378 1.5" stroke="url(#paint0_linear_7_3645)" stroke-width="2" stroke-linecap="round"/>
<defs>
<linearGradient id="paint0_linear_7_3645" x1="1" y1="1.5" x2="5.52687" y2="60.7337" gradientUnits="userSpaceOnUse">
<stop stop-color="#F539F8"/>

Before

Width:  |  Height:  |  Size: 469 B

After

Width:  |  Height:  |  Size: 532 B

@@ -1,5 +1,4 @@
import React from "react";
import { Link } from "react-router-dom";
import titleShape from "../../../assets/images/shape/title-shape-two.svg";
import InputCom from "../../Helpers/Inputs/InputCom";
import AuthLayout from "../AuthLayout";
@@ -16,7 +15,7 @@ export default function ForgotPassword() {
<h1 className="sm:text-5xl text-4xl font-bold sm:leading-[74px] text-dark-gray dark:text-white">
Forget Password
</h1>
<div className="shape">
<div className="shape sm:w-[377px] w-[270px] -mt-1 ml-5">
<img src={titleShape} alt="shape" />
</div>
</div>
@@ -39,9 +38,6 @@ export default function ForgotPassword() {
</a>
</div>
</div>
<Link to ="/" className=" my-40 font-bold flex justify-center text-dark-gray items-center">
Return Home
</Link>
</div>
</div>
</AuthLayout>
+11 -5
View File
@@ -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);
};
@@ -18,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 !== "") {
@@ -35,7 +41,7 @@ export default function Login() {
setLoginLoading(false);
}, 2000);
} else {
toast.error("Invalid Credential");
setLoginError(true)
}
}
};
@@ -116,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>
@@ -127,6 +132,7 @@ export default function Login() {
)}
</button>
</div>
{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"
@@ -139,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>