Skip to content

Commit 99bad59

Browse files
authored
Merge pull request #248 from AyushSharma72/responsive
Fix the responsive ness of the navbar and login page #248
2 parents 9d94985 + 03a975d commit 99bad59

File tree

4 files changed

+530
-272
lines changed

4 files changed

+530
-272
lines changed

client/src/component/Login.jsx

Lines changed: 92 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import {
1111
import "../css/Login.css";
1212
import toast from "react-hot-toast";
1313

14-
const VITE_SERVER_PORT = import.meta.env.VITE_SERVER_PORT || 'https://bitbox-uxbo.onrender.com';
14+
const VITE_SERVER_PORT =
15+
import.meta.env.VITE_SERVER_PORT || "https://bitbox-uxbo.onrender.com";
1516

1617
const Login = ({ mode, showAlert,isloggedin,setloggedin }) => {
1718
const [credentials, setCredentials] = useState({ email: "", password: "" });
@@ -66,48 +67,102 @@ const Login = ({ mode, showAlert,isloggedin,setloggedin }) => {
6667
color: mode === "dark" ? "white" : "black",
6768
}}
6869
>
69-
<form
70-
onSubmit={handleSubmit}
71-
className="form"
72-
73-
<div
74-
className="wrapper h-3/4 mt-10"
75-
76-
77-
<h1 className="title">Login</h1>
78-
<span className="title-line"></span>
79-
<div className="inp">
80-
<Input
81-
prefix={<UserOutlined />}
82-
type="email"
83-
placeholder="Email"
84-
name="email"
85-
value={credentials.email}
86-
onChange={onChange}
87-
autoComplete="on"
88-
required
89-
className="h-10 text-xl"
70+
71+
<form
72+
onSubmit={handleSubmit}
73+
className="form"
74+
style={{
75+
backgroundColor: mode === "dark" ? "black" : "white",
76+
color: mode === "dark" ? "white" : "black",
77+
}}
78+
>
79+
<h1 className="title">Login</h1>
80+
<span className="title-line"></span>
81+
<div className="inp">
82+
<Input
83+
prefix={<UserOutlined />}
84+
type="email"
85+
placeholder="Email"
86+
name="email"
87+
value={credentials.email}
88+
onChange={onChange}
89+
autoComplete="on"
90+
required
91+
className="h-10 text-xl"
92+
style={{
93+
backgroundColor: mode === "dark" ? "black" : "white",
94+
color: mode === "dark" ? "white" : "black",
95+
}}
96+
/>
97+
</div>
98+
99+
<div className="inp">
100+
<Input.Password
101+
prefix={<LockOutlined />}
102+
placeholder="Password"
103+
name="password"
104+
value={credentials.password}
105+
onChange={onChange}
106+
autoComplete="on"
107+
className="h-10 text-xl"
108+
style={{
109+
backgroundColor: mode === "dark" ? "black" : "white",
110+
color: mode === "dark" ? "white" : "black",
111+
}}
112+
required
113+
iconRender={(visible) =>
114+
visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />
115+
}
116+
/>
117+
</div>
118+
119+
<Button
120+
className="submit h-10 text-xl"
121+
type="submit"
122+
disabled={loading}
123+
>
124+
{loading ? <Spin size="small" /> : "Login"}
125+
</Button>
126+
127+
<p
128+
className="footer text-xl"
90129
style={{
91130
backgroundColor: mode === "dark" ? "black" : "white",
92131
color: mode === "dark" ? "white" : "black",
93132
}}
94-
/>
95-
</div>
133+
>
134+
Don&apos;t have an account?
135+
<Link className="link text-xl" to="/signup">
136+
{" "}
137+
Sign Up
138+
</Link>
139+
</p>
140+
141+
<Button
142+
style={{ backgroundColor: "#6366f1", color: "#FFFFFF" }}
143+
onClick={() => navigate("/forgot-password")}
144+
className="mt-3 h-10 text-xl"
145+
>
146+
Forgot Password?
147+
</Button>
148+
</form>
149+
150+
<div className="banner">
151+
<h1
152+
className="wel_text"
96153

97-
<div className="inp">
98-
<Input.Password
99-
prefix={<LockOutlined />}
100-
placeholder="Password"
101-
name="password"
102-
value={credentials.password}
103-
onChange={onChange}
104-
autoComplete="on"
105-
106-
iconRender={(visible) =>
107-
visible ? <EyeTwoTone /> : <EyeInvisibleOutlined />
108-
}
154+
style={{
155+
backgroundColor: mode === "dark" ? "black" : "white",
156+
color: mode === "dark" ? "white" : "black",
157+
}}
109158

110-
className="h-10 text-xl"
159+
>
160+
WELCOME
161+
<br />
162+
BACK!
163+
</h1>
164+
<p
165+
className="para"
111166

112167
style={{
113168
backgroundColor: mode === "dark" ? "black" : "white",

0 commit comments

Comments
 (0)