diff options
Diffstat (limited to 'src/components/profile')
| -rw-r--r-- | src/components/profile/Content.tsx | 8 | ||||
| -rw-r--r-- | src/components/profile/ProfileHeader.tsx | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/components/profile/Content.tsx b/src/components/profile/Content.tsx index c70d6df5..8298dc9a 100644 --- a/src/components/profile/Content.tsx +++ b/src/components/profile/Content.tsx @@ -145,7 +145,13 @@ const Content: React.FC<ContentProps> = ({userXId, screenType}) => { <Cover {...{userXId, screenType}} /> <ProfileCutout /> <ProfileHeader - {...{userXId, screenType, handleBlockUnblock, isBlocked}} + {...{ + userXId, + screenType, + handleBlockUnblock, + isBlocked, + isPrivate: !canViewProfile(state, userXId, screenType), + }} /> <ProfileBody {...{ diff --git a/src/components/profile/ProfileHeader.tsx b/src/components/profile/ProfileHeader.tsx index 90206f8d..82eda258 100644 --- a/src/components/profile/ProfileHeader.tsx +++ b/src/components/profile/ProfileHeader.tsx @@ -18,6 +18,7 @@ type ProfileHeaderProps = { screenType: ScreenType; isBlocked: boolean; handleBlockUnblock: () => void; + isPrivate?: boolean; }; const ProfileHeader: React.FC<ProfileHeaderProps> = ({ @@ -25,6 +26,7 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({ screenType, isBlocked, handleBlockUnblock, + isPrivate, }) => { const { profile: {name = '', university_class = 2021, university}, @@ -109,11 +111,9 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({ <View style={styles.friendsAndUniversity}> <FriendsCount screenType={screenType} userXId={userXId} /> - <TouchableOpacity - disabled={userId === loggedInUserId ? false : true} onPress={() => { - if (userId === loggedInUserId) { + if (!isPrivate) { setBadgeViewVisible(true); } }}> @@ -126,7 +126,6 @@ const ProfileHeader: React.FC<ProfileHeaderProps> = ({ university, university_class, needsShadow: true, - // textStyle: getTextColor(), }} /> )} |
