diff options
author | Ivan Chen <ivan@tagg.id> | 2021-03-30 16:13:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 16:13:41 -0400 |
commit | f570f6c75ff051e9f8afe359a237a05828dc6ffb (patch) | |
tree | 6312728d93cafb062fdfd0e4303f8554c3ffdb05 /src/components/profile/Friends.tsx | |
parent | 51221063c1747ea7ba6a250e60906d6a06b0fbd8 (diff) | |
parent | 6aaeed352035aa827d590d479f979f7488f01c2d (diff) |
Merge pull request #342 from shravyaramesh/tma718-move-invite-friends
[TMA-718] Move Invite Friends to Notifications Screen
Diffstat (limited to 'src/components/profile/Friends.tsx')
-rw-r--r-- | src/components/profile/Friends.tsx | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/src/components/profile/Friends.tsx b/src/components/profile/Friends.tsx index ac724ae0..44f6bb48 100644 --- a/src/components/profile/Friends.tsx +++ b/src/components/profile/Friends.tsx @@ -1,9 +1,9 @@ import {useNavigation} from '@react-navigation/native'; import React, {useEffect, useState} from 'react'; -import {Alert, Linking, ScrollView, StyleSheet, Text, View} from 'react-native'; +import {ScrollView, StyleSheet, Text, View} from 'react-native'; import {checkPermission} from 'react-native-contacts'; import {TouchableOpacity} from 'react-native-gesture-handler'; -import {useDispatch, useSelector, useStore} from 'react-redux'; +import {useDispatch, useStore} from 'react-redux'; import {TAGG_LIGHT_BLUE} from '../../constants'; import {usersFromContactsService} from '../../services'; import {NO_USER} from '../../store/initialStates'; @@ -17,7 +17,6 @@ import { } from '../../utils'; import {handleAddFriend, handleUnfriend} from '../../utils/friends'; import {ProfilePreview} from '../profile'; -import FindFriendsBlueIcon from '../../assets/icons/findFriends/find-friends-blue-icon.svg'; interface FriendsProps { result: Array<ProfilePreviewType>; @@ -88,34 +87,7 @@ const Friends: React.FC<FriendsProps> = ({result, screenType, userId}) => { {loggedInUser.userId === userId && ( <View style={styles.subheader}> <View style={styles.addFriendHeaderContainer}> - <Text style={[styles.subheaderText]}>Add Friends</Text> - <TouchableOpacity - style={styles.findFriendsButton} - onPress={async () => { - const permission = await checkPermission(); - if (permission === 'authorized') { - navigation.navigate('InviteFriendsScreen', { - screenType: ScreenType.Profile, - }); - } else { - Alert.alert( - '"Tagg" Would Like to Access Your Contacts', - 'This helps you quickly get in touch with friends on the app and more', - [ - { - text: "Don't Allow", - style: 'cancel', - }, - {text: 'Allow', onPress: () => Linking.openSettings()}, - ], - ); - } - }}> - <FindFriendsBlueIcon width={20} height={20} /> - <Text style={styles.findFriendsSubheaderText}> - Invite Friends - </Text> - </TouchableOpacity> + <Text style={[styles.subheaderText]}>Contacts on tagg</Text> </View> <UsersFromContacts /> </View> |