Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d6eadbb46b |
@@ -9,6 +9,10 @@ import AuthLayout from "../AuthLayout";
|
|||||||
export default function Login() {
|
export default function Login() {
|
||||||
const [checked, setValue] = useState(false);
|
const [checked, setValue] = useState(false);
|
||||||
const [loginLoading, setLoginLoading] = useState(false);
|
const [loginLoading, setLoginLoading] = useState(false);
|
||||||
|
|
||||||
|
//login error state
|
||||||
|
const [loginError, setLoginError] = useState(false);
|
||||||
|
|
||||||
const rememberMe = () => {
|
const rememberMe = () => {
|
||||||
setValue(!checked);
|
setValue(!checked);
|
||||||
};
|
};
|
||||||
@@ -35,7 +39,8 @@ export default function Login() {
|
|||||||
setLoginLoading(false);
|
setLoginLoading(false);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
} else {
|
} else {
|
||||||
toast.error("Invalid Credential");
|
// toast.error("Invalid Credential");
|
||||||
|
setLoginError(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -102,7 +107,7 @@ export default function Login() {
|
|||||||
</button>
|
</button>
|
||||||
<span
|
<span
|
||||||
onClick={rememberMe}
|
onClick={rememberMe}
|
||||||
className="text-base text-dark-gray dark:text-white"
|
className="text-base text-dark-gray dark:text-white"
|
||||||
>
|
>
|
||||||
Remember Me
|
Remember Me
|
||||||
</span>
|
</span>
|
||||||
@@ -127,6 +132,7 @@ export default function Login() {
|
|||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
{loginError && <p class="text-center text-red-600 pb-4">Invalid Credential</p>}
|
||||||
<a
|
<a
|
||||||
href="#"
|
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"
|
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>
|
</AuthLayout>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user