Skip to content

Commit 8fd16bd

Browse files
authored
Merge pull request #149 from Riyad-Murad/staging
Staging
2 parents 355079f + 3b5bfed commit 8fd16bd

File tree

2 files changed

+25
-37
lines changed

2 files changed

+25
-37
lines changed

amp-client/src/Pages/ClientPages/ClientProfile/ClientProfile.jsx

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { toast } from "react-toastify";
44
import { useNavigate } from "react-router-dom";
55
import "react-toastify/dist/ReactToastify.css";
66
import axiosBaseUrl from "../../../Axios/axios";
7+
import InputField from "../../../Components/CommonComponents/InputField/InputField";
78
import ActionButton from "../../../Components/CommonComponents/ActionButton/ActionButton";
89

910
const ClientProfile = () => {
@@ -44,49 +45,45 @@ const ClientProfile = () => {
4445
<h2>Change Password</h2>
4546
<form className="password-form" onSubmit={handleSubmit}>
4647
<div className="form-group">
47-
<h4 htmlFor="current-password">Current Password:</h4>
48-
<input
49-
id="current-password"
50-
type="password"
48+
<InputField
49+
label="Current Password"
5150
placeholder="Enter current password"
5251
value={currentPassword}
5352
onChange={(e) => setCurrentPassword(e.target.value)}
54-
required
53+
type="password"
54+
width="90%"
5555
/>
5656
</div>
5757

5858
<div className="form-group">
59-
<h4 htmlFor="new-password">New Password:</h4>
60-
<input
61-
id="new-password"
62-
type="password"
59+
<InputField
60+
label="New Password"
6361
placeholder="Enter new password"
6462
value={newPassword}
6563
onChange={(e) => setNewPassword(e.target.value)}
66-
required
64+
type="password"
65+
width="90%"
6766
/>
6867
</div>
6968

7069
<div className="form-group">
71-
<h4 htmlFor="confirm-password">Confirm New Password:</h4>
72-
<input
73-
id="confirm-password"
74-
type="password"
70+
<InputField
71+
label="Confirm New Password"
7572
placeholder="Confirm new password"
7673
value={confirmPassword}
7774
onChange={(e) => setConfirmPassword(e.target.value)}
78-
required
75+
type="password"
76+
width="90%"
7977
/>
8078
</div>
8179

8280
<ActionButton
8381
text="Save Changes"
8482
backgroundColor="#233A7E"
8583
color="#FFF"
86-
width="100%"
84+
width="50%"
8785
margin="20px 0 0"
8886
/>
89-
{/* {message && <p className="form-message">{message}</p>} */}
9087
</form>
9188
</div>
9289
);

amp-client/src/Pages/ClientPages/ClientProfile/styles.css

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,34 @@
55
margin: 50px auto;
66
border-radius: 10px;
77
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
8+
9+
display: flex;
10+
flex-direction: column;
11+
align-items: center;
12+
justify-content: center;
813
}
914

1015
h2 {
1116
margin-bottom: 30px;
17+
text-align: center;
1218
}
1319

1420
.password-form {
1521
display: flex;
1622
flex-direction: column;
23+
width: 100%;
24+
align-items: center;
1725
}
1826

1927
.form-group {
28+
width: 100%;
2029
margin-bottom: 20px;
21-
}
22-
23-
.form-group h4 {
24-
display: block;
25-
margin-bottom: 5px;
26-
}
27-
28-
.password-form input {
29-
padding: 10px;
30-
font-size: 16px;
31-
border: 1px solid #ccc;
32-
border-radius: 6px;
33-
width: 95%;
30+
display: flex;
31+
justify-content: center;
3432
}
3533

3634
.form-message {
3735
margin-top: 15px;
3836
color: #d00;
3937
font-weight: 500;
4038
}
41-
42-
.password-form label {
43-
font-weight: 500;
44-
margin-bottom: 5px;
45-
margin-top: 10px;
46-
display: block;
47-
}

0 commit comments

Comments
 (0)