email sent when personal information changed
This commit is contained in:
@@ -807,20 +807,52 @@ const Profile: React.FC = () => {
|
||||
{/* Personal Information Card */}
|
||||
<div className="card mb-4">
|
||||
<div className="card-body">
|
||||
<div className="d-flex align-items-center mb-3">
|
||||
<h5 className="card-title mb-0">Personal Information</h5>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-link text-primary p-0 ms-2"
|
||||
onClick={() => setShowPersonalInfo(!showPersonalInfo)}
|
||||
style={{ textDecoration: "none" }}
|
||||
>
|
||||
<i
|
||||
className={`bi ${
|
||||
showPersonalInfo ? "bi-eye" : "bi-eye-slash"
|
||||
} fs-5`}
|
||||
></i>
|
||||
</button>
|
||||
<div className="d-flex align-items-center justify-content-between mb-3">
|
||||
<div className="d-flex align-items-center">
|
||||
<h5 className="card-title mb-0">Personal Information</h5>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-link text-primary p-0 ms-2"
|
||||
onClick={() => setShowPersonalInfo(!showPersonalInfo)}
|
||||
style={{ textDecoration: "none" }}
|
||||
>
|
||||
<i
|
||||
className={`bi ${
|
||||
showPersonalInfo ? "bi-eye" : "bi-eye-slash"
|
||||
} fs-5`}
|
||||
></i>
|
||||
</button>
|
||||
</div>
|
||||
{showPersonalInfo && (
|
||||
<div>
|
||||
{editing ? (
|
||||
<div className="d-flex gap-2">
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm"
|
||||
onClick={handleSubmit}
|
||||
>
|
||||
Save Changes
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-secondary btn-sm"
|
||||
onClick={handleCancel}
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
) : (
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary btn-sm"
|
||||
onClick={() => setEditing(true)}
|
||||
>
|
||||
Edit Information
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{showPersonalInfo && (
|
||||
<form onSubmit={handleSubmit}>
|
||||
@@ -1125,31 +1157,6 @@ const Profile: React.FC = () => {
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<hr className="my-4" />
|
||||
|
||||
{editing ? (
|
||||
<div className="d-flex gap-2">
|
||||
<button type="submit" className="btn btn-primary">
|
||||
Save Changes
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-secondary"
|
||||
onClick={handleCancel}
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
) : (
|
||||
<button
|
||||
type="button"
|
||||
className="btn btn-primary"
|
||||
onClick={() => setEditing(true)}
|
||||
>
|
||||
Edit Information
|
||||
</button>
|
||||
)}
|
||||
</form>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user