diff options
author | Ashm Walia <40498934+ashmgarv@users.noreply.github.com> | 2020-12-30 11:36:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 14:36:44 -0500 |
commit | 38661e00281363b0f4ad32f0b29d739e1ca09164 (patch) | |
tree | 316cd837b6cc6ae24783f1d93d6c9ee7fb898f68 /src/components/profile/ProfileBody.tsx | |
parent | bd2f89805d0bb1c2f1d08fe8d91099aa4f109d35 (diff) |
[TMA - 457]Change followers to friends (#149)
* One commit to replace followers with friends
* Move block unblock to drawer and some cosmetic changes
* Options to edit own profile when viewing
* Changes for University Class
* Small fix
* Made ProfileOnboarding a scroll view and other small changes
* Small fix
* Small fix thanks to ivan and tanmay
* Add ?
Diffstat (limited to 'src/components/profile/ProfileBody.tsx')
-rw-r--r-- | src/components/profile/ProfileBody.tsx | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/src/components/profile/ProfileBody.tsx b/src/components/profile/ProfileBody.tsx index 85634daa..70f98a4b 100644 --- a/src/components/profile/ProfileBody.tsx +++ b/src/components/profile/ProfileBody.tsx @@ -9,18 +9,18 @@ import {NO_PROFILE} from '../../store/initialStates'; interface ProfileBodyProps { onLayout: (event: LayoutChangeEvent) => void; - isFollowed: boolean; + isFriend: boolean; isBlocked: boolean; - handleFollowUnfollow: Function; - handleBlockUnblock: Function; + handleFriendUnfriend: () => void; + handleBlockUnblock: () => void; userXId: string | undefined; screenType: ScreenType; } const ProfileBody: React.FC<ProfileBodyProps> = ({ onLayout, - isFollowed, + isFriend, isBlocked, - handleFollowUnfollow, + handleFriendUnfriend, handleBlockUnblock, userXId, screenType, @@ -48,21 +48,26 @@ const ProfileBody: React.FC<ProfileBodyProps> = ({ ); }}>{`${website}`}</Text> )} - {userXId && ( + + {userXId && isBlocked && ( <View style={styles.toggleButtonContainer}> - {!isBlocked && ( - <ToggleButton - toggleState={isFollowed} - handleToggle={handleFollowUnfollow} - buttonType={TOGGLE_BUTTON_TYPE.FOLLOW_UNFOLLOW} - /> - )} <ToggleButton toggleState={isBlocked} handleToggle={handleBlockUnblock} buttonType={TOGGLE_BUTTON_TYPE.BLOCK_UNBLOCK} /> </View> + + )} + {userXId && !isBlocked && ( + <View style={styles.toggleButtonContainer}> + <ToggleButton + toggleState={isFriend} + handleToggle={handleFriendUnfriend} + buttonType={TOGGLE_BUTTON_TYPE.FRIEND_UNFRIEND} + /> + </View> + )} </View> ); |