Skip to content

Commit b19ef62

Browse files
committed
Update UserProfile.jsx
- Add check to show delete and logout button only when not editing
1 parent 607f2a4 commit b19ef62

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

Frontend/src/Components/LandingPage/UserProfile.jsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,18 @@ const navigate = useNavigate();
9191
<div className="profile-detail">{lang}</div>
9292
)}
9393
</div>
94-
<div className="profile-delete-container">
95-
<div className="profile-delete-btn" onClick = {(e) => {handleDeleteUser()}}>
96-
Delete Account
97-
</div>
94+
{!isEdit ?
95+
<div className="profile-delete-container">
96+
<div className="profile-delete-btn" onClick = {(e) => {handleDeleteUser()}}>
97+
Delete Account
98+
</div>
9899

99-
<div className="logout-btn" onClick = {(e) => {handleLogout()}}>
100-
Logout
101-
</div>
102-
</div>
100+
<div className="logout-btn" onClick = {(e) => {handleLogout()}}>
101+
Logout
102+
</div>
103+
</div> :
104+
<div ></div>
105+
}
103106
</div>
104107

105108

0 commit comments

Comments
 (0)