aboutsummaryrefslogtreecommitdiff
path: root/src/screens/profile/InviteFriendsScreen.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens/profile/InviteFriendsScreen.tsx')
-rw-r--r--src/screens/profile/InviteFriendsScreen.tsx32
1 files changed, 10 insertions, 22 deletions
diff --git a/src/screens/profile/InviteFriendsScreen.tsx b/src/screens/profile/InviteFriendsScreen.tsx
index 1a5de1ce..53215d8a 100644
--- a/src/screens/profile/InviteFriendsScreen.tsx
+++ b/src/screens/profile/InviteFriendsScreen.tsx
@@ -15,6 +15,7 @@ import {
import {useDispatch, useStore} from 'react-redux';
import {ContactType, ProfilePreviewType, ScreenType} from '../../types';
import {
+ extractContacts,
handleAddFriend,
HeaderHeight,
normalize,
@@ -53,24 +54,6 @@ const InviteFriendsScreen: React.FC<InviteFriendsScreenProps> = ({
});
const [query, setQuery] = useState('');
- const extractContacts = async () => {
- let retrievedContacts: Array<ContactType> = [];
- await getAll().then((contacts) => {
- contacts.map((contact) => {
- let obj: ContactType = {
- first_name: contact.givenName,
- last_name: contact.familyName,
- };
- contact.phoneNumbers.map(async (phoneNumber) => {
- obj.phone_number = phoneNumber.number;
- retrievedContacts.push(obj);
- console.log('contact: ', obj);
- });
- });
- });
- return retrievedContacts;
- };
-
useEffect(() => {
const handleFindFriends = () => {
extractContacts().then(async (retrievedContacts) => {
@@ -190,7 +173,13 @@ const InviteFriendsScreen: React.FC<InviteFriendsScreenProps> = ({
<SafeAreaView>
<StatusBar barStyle="dark-content" />
<View style={styles.body}>
- <View style={{width: 319, height: 42, alignSelf: 'center', marginBottom: '2%',}}>
+ <View
+ style={{
+ width: 319,
+ height: 42,
+ alignSelf: 'center',
+ marginBottom: '2%',
+ }}>
<Text style={[styles.subheaderText, {textAlign: 'center'}]}>
Sharing is caring, invite friends, and create moments together!
</Text>
@@ -224,9 +213,7 @@ const InviteFriendsScreen: React.FC<InviteFriendsScreenProps> = ({
</Animated.View>
</View>
<View style={styles.subheader}>
- <Text style={[styles.subheaderText, {marginBottom: '5%'}]}>
- Add Friends
- </Text>
+ <Text style={styles.subheaderText}>Add Friends</Text>
<UsersFromContacts />
</View>
<View style={styles.subheader}>
@@ -257,6 +244,7 @@ const styles = StyleSheet.create({
fontSize: normalize(12),
fontWeight: '600',
lineHeight: normalize(14.32),
+ marginBottom: '5%',
},
container: {
alignSelf: 'center',