From b8849ef23814584145b5c2a14668bbfe5afa62fe Mon Sep 17 00:00:00 2001 From: Vanessa Lai <159257119+vanesssalai@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:47:38 +0800 Subject: [PATCH] Fixed Profile toggle issue --- src/pages/userprofile/UserProfile.jsx | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/pages/userprofile/UserProfile.jsx b/src/pages/userprofile/UserProfile.jsx index bbdaa90..b93847d 100644 --- a/src/pages/userprofile/UserProfile.jsx +++ b/src/pages/userprofile/UserProfile.jsx @@ -284,9 +284,9 @@ function UserProfile() { )} -
+
setViewToggle('listing')} > Listings @@ -306,27 +306,27 @@ function UserProfile() {
- {viewToggle === "listing" ? ( -
- {userReviews.length > 0 ? ( - - ) : ( -

This user has no reviews ( ˘・з・)

- )} -
- ) : viewToggle === "review" ? ( -
- {userListings.length > 0 ? ( - - ) : ( -

This user has no listings ( ˘・з・)

- )} -
+ {viewToggle === "listing" ? ( +
+ {userListings.length > 0 ? ( + + ) : ( +

This user has no listings ( ˘・з・)

+ )} +
+ ) : viewToggle === "review" ? ( +
+ {userReviews.length > 0 ? ( + + ) : ( +

This user has no reviews ( ˘・з・)

+ )} +
) : (
{userForumPosts.length > 0 ? ( @@ -348,4 +348,4 @@ function UserProfile() { ); } -export default UserProfile; \ No newline at end of file +export default UserProfile;