diff options
author | Shravya Ramesh <shravs1208@gmail.com> | 2021-03-18 16:15:51 -0700 |
---|---|---|
committer | Shravya Ramesh <shravs1208@gmail.com> | 2021-03-18 16:15:51 -0700 |
commit | 5c3543494cdc2f164563bff70dbb25398b0cab5c (patch) | |
tree | da4bc85929f10f7535ef89770483b4bc911b1ec7 /src/components | |
parent | b1c88afecd72864fe928882fc64c767dc58076fe (diff) |
alert requesting access to contacts
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/profile/Friends.tsx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/components/profile/Friends.tsx b/src/components/profile/Friends.tsx index 62ae2b48..1c205ce6 100644 --- a/src/components/profile/Friends.tsx +++ b/src/components/profile/Friends.tsx @@ -1,6 +1,6 @@ import {useNavigation} from '@react-navigation/native'; import React, {useEffect, useState} from 'react'; -import {Linking, ScrollView, StyleSheet, Text, View} from 'react-native'; +import {Alert, Linking, 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'; @@ -102,7 +102,17 @@ const Friends: React.FC<FriendsProps> = ({result, screenType, userId}) => { screenType: ScreenType.Profile, }); } else { - Linking.openSettings(); + 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} /> |