Skip to content

Commit

Permalink
solved-#98
Browse files Browse the repository at this point in the history
  • Loading branch information
AtharvGaur05 committed Oct 15, 2024
1 parent b034a33 commit 21fdc81
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 7 deletions.
16 changes: 14 additions & 2 deletions client/src/component/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "./css/Login.css";

const host = "http://localhost:5000";

const Login = (props) => {
const Login = ({mode}) => {
const [credentials, setCredentials] = useState({ email: "", password: "" });
const [forgotPasswordModalVisible, setForgotPasswordModalVisible] =
useState(false);
Expand Down Expand Up @@ -132,6 +132,11 @@ const Login = (props) => {
name="email"
aria-describedby="emailHelp"
autoComplete="on"
style={{
backgroundColor: mode === 'dark' ? 'black' : 'white',
color: mode === 'dark' ? 'white' : 'black',
}}

/>
<i className="fa-solid fa-user"></i>
</div>
Expand All @@ -145,8 +150,15 @@ const Login = (props) => {
onChange={onChange}
name="password"
autoComplete="on"
style={{
backgroundColor: mode === 'dark' ? 'black' : 'white',
color: mode === 'dark' ? 'white' : 'black',
}}
/>
<i className="fa-solid fa-lock"></i>
<i className="fa-solid fa-lock" style={{
backgroundColor: mode === 'dark' ? 'black' : 'white',
color: mode === 'dark' ? 'white' : 'black',
}}></i>
</div>
<Button className="submit" type="submit" onChange={onChange}>
Login
Expand Down
34 changes: 29 additions & 5 deletions client/src/component/Signup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { registerValidation } from "../validations/validation";
// import { auth } from '../component/Firebase/Setup';
const host = "http://localhost:5000";

const Signup = (props) => {
const Signup = ({mode}) => {
// const [value, setValue] = useState('');
const [showPassword, setShowPassword] = useState(false);
const [showConfirmPassword, setShowConfirmPassword] = useState(false);
Expand Down Expand Up @@ -274,9 +274,16 @@ const Signup = (props) => {
id="name"
autoComplete="on"
value={name}
style={{
backgroundColor: mode === 'dark' ? 'black' : 'white',
color: mode === 'dark' ? 'white' : 'black',
}}
/>
{errors.name && <div className="text-danger">{errors.name}</div>}
<i className="fa-solid fa-user"></i>
<i className="fa-solid fa-user" style={{
backgroundColor: mode === 'dark' ? 'black' : 'white',
color: mode === 'dark' ? 'white' : 'black',
}}></i>
</div>
<div className="inp">
<input
Expand All @@ -289,11 +296,18 @@ const Signup = (props) => {
aria-describedby="emailHelp"
autoComplete="on"
value={email}
style={{
backgroundColor: mode === 'dark' ? 'black' : 'white',
color: mode === 'dark' ? 'white' : 'black',
}}
/>
{errors.email && <div className="text-danger">{errors.email}</div>}
<i className="fa-solid fa-user"></i>
</div>
<div className="inp">
<div className="inp" style={{
backgroundColor: mode === 'dark' ? 'black' : 'white',
color: mode === 'dark' ? 'white' : 'black',
}}>
<input
type={showPassword ? "text" : "password"}
className="input"
Expand All @@ -304,9 +318,16 @@ const Signup = (props) => {
minLength={5}
autoComplete="on"
value={password}
style={{
backgroundColor: mode === 'dark' ? 'black' : 'white',
color: mode === 'dark' ? 'white' : 'black',
}}
/>
{errors.password && (
<div className="text-danger">{errors.password}</div>
<div className="text-danger" style={{
backgroundColor: mode === 'dark' ? 'black' : 'white',
color: mode === 'dark' ? 'white' : 'black',
}}>{errors.password}</div>
)}
<button
type="button"
Expand All @@ -319,7 +340,10 @@ const Signup = (props) => {
<Eye className="w-5 h-5" />
)}
</button>
<i className="fa-solid fa-user"></i>
<i className="fa-solid fa-user" style={{
backgroundColor: mode === 'dark' ? 'black' : 'white',
color: mode === 'dark' ? 'white' : 'black',
}}></i>
</div>
<div className="inp">
<input
Expand Down

0 comments on commit 21fdc81

Please sign in to comment.