Skip to content

Commit

Permalink
login button working
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushSharma72 committed Oct 23, 2024
1 parent 4b85b89 commit 5cea38f
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions client/src/component/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,31 +55,31 @@ const Login = ({ mode, showAlert }) => {

return (
<div
className='wrapper'
className="wrapper"
style={{
backgroundColor: mode === "dark" ? "black" : "white",
color: mode === "dark" ? "white" : "black",
}}
>
<form
onSubmit={handleSubmit}
className='form'
className="form"
style={{
backgroundColor: mode === "dark" ? "black" : "white",
color: mode === "dark" ? "white" : "black",
}}
>
<h1 className='title'>Login</h1>
<span className='title-line'></span>
<div className='inp'>
<h1 className="title">Login</h1>
<span className="title-line"></span>
<div className="inp">
<Input
prefix={<UserOutlined />}
type='email'
placeholder='Email'
name='email'
type="email"
placeholder="Email"
name="email"
value={credentials.email}
onChange={onChange}
autoComplete='on'
autoComplete="on"
required
style={{
backgroundColor: mode === "dark" ? "black" : "white",
Expand All @@ -88,14 +88,14 @@ const Login = ({ mode, showAlert }) => {
/>
</div>

<div className='inp'>
<div className="inp">
<Input.Password
prefix={<LockOutlined />}
placeholder='Password'
name='password'
placeholder="Password"
name="password"
value={credentials.password}
onChange={onChange}
autoComplete='on'
autoComplete="on"
iconRender={(visible) =>
visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />
}
Expand All @@ -107,19 +107,25 @@ const Login = ({ mode, showAlert }) => {
/>
</div>

<Button className='submit' type='submit' disabled={loading}>
{loading ? <Spin size='small' /> : "Login"}
</Button>
<button
className="submit"
disabled={loading}
onClick={() => {
handleSubmit();
}}
>
{loading ? <Spin size="small" /> : "Login"}
</button>

<p
className='footer'
className="footer"
style={{
backgroundColor: mode === "dark" ? "black" : "white",
color: mode === "dark" ? "white" : "black",
}}
>
Don&apos;t have an account?
<Link className='link' to='/Signup'>
<Link className="link" to="/Signup">
{" "}
Sign Up
</Link>
Expand All @@ -128,15 +134,15 @@ const Login = ({ mode, showAlert }) => {
<Button
style={{ backgroundColor: "#6366f1", color: "#FFFFFF" }}
onClick={() => navigate("/forgot-password")}
className='mt-3'
className="mt-3"
>
Forgot Password?
</Button>
</form>

<div className='banner'>
<div className="banner">
<h1
className='wel_text'
className="wel_text"
style={{
color: mode === "dark" ? "black" : "white",
}}
Expand All @@ -146,7 +152,7 @@ const Login = ({ mode, showAlert }) => {
BACK!
</h1>
<p
className='para'
className="para"
style={{
color: mode === "dark" ? "black" : "white",
}}
Expand Down

0 comments on commit 5cea38f

Please sign in to comment.