diff options
author | Ivan Chen <ivan@tagg.id> | 2021-05-10 16:28:37 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-05-10 16:50:42 -0400 |
commit | 0b338e0c243c63fc836c7a9829ef3787045bc034 (patch) | |
tree | 01ad1c2298c9e0ba2e21021661389f76163e9cc7 /src/components/profile/Friends.tsx | |
parent | 3dd918e6a981645cd7bed7d32425ac64cb9af601 (diff) |
added navigation to "Likes" screen
Diffstat (limited to 'src/components/profile/Friends.tsx')
-rw-r--r-- | src/components/profile/Friends.tsx | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/components/profile/Friends.tsx b/src/components/profile/Friends.tsx index a7a06567..c9d8e6ae 100644 --- a/src/components/profile/Friends.tsx +++ b/src/components/profile/Friends.tsx @@ -21,9 +21,15 @@ interface FriendsProps { result: Array<ProfilePreviewType>; screenType: ScreenType; userId: string | undefined; + hideSubheader?: boolean; } -const Friends: React.FC<FriendsProps> = ({result, screenType, userId}) => { +const Friends: React.FC<FriendsProps> = ({ + result, + screenType, + userId, + hideSubheader, +}) => { const state: RootState = useStore().getState(); const dispatch = useDispatch(); const {user: loggedInUser = NO_USER} = state.user; @@ -85,14 +91,16 @@ const Friends: React.FC<FriendsProps> = ({result, screenType, userId}) => { {loggedInUser.userId === userId && usersFromContacts.length !== 0 && ( <View style={styles.subheader}> <View style={styles.addFriendHeaderContainer}> - <Text style={[styles.subheaderText]}>Contacts on Tagg</Text> + <Text style={styles.subheaderText}>Contacts on Tagg</Text> </View> <UsersFromContacts /> </View> )} - <Text style={[styles.subheaderText, styles.friendsSubheaderText]}> - Friends - </Text> + {!hideSubheader && ( + <Text style={[styles.subheaderText, styles.friendsSubheaderText]}> + Friends + </Text> + )} <ScrollView keyboardShouldPersistTaps={'always'} style={styles.scrollView} @@ -129,7 +137,6 @@ const styles = StyleSheet.create({ alignSelf: 'center', width: SCREEN_WIDTH * 0.85, }, - firstScrollView: {}, scrollViewContent: { alignSelf: 'center', paddingBottom: SCREEN_HEIGHT / 7, @@ -142,7 +149,6 @@ const styles = StyleSheet.create({ marginBottom: '3%', marginTop: '2%', }, - header: {flexDirection: 'row'}, subheader: { alignSelf: 'center', width: SCREEN_WIDTH * 0.85, @@ -154,20 +160,12 @@ const styles = StyleSheet.create({ fontWeight: '600', lineHeight: normalize(14.32), }, - findFriendsButton: {flexDirection: 'row'}, friendsSubheaderText: { alignSelf: 'center', width: SCREEN_WIDTH * 0.85, marginVertical: '1%', marginBottom: '2%', }, - findFriendsSubheaderText: { - marginLeft: '5%', - color: '#08E2E2', - fontSize: normalize(12), - fontWeight: '600', - lineHeight: normalize(14.32), - }, container: { alignSelf: 'center', flexDirection: 'row', |