From 5c01225acf5aa4c5be3b4638779d1f766c054eca Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 14 May 2021 13:46:35 -0700 Subject: Added pending user list --- src/screens/profile/InviteFriendsScreen.tsx | 96 ++++++++++++++++++++--------- 1 file changed, 68 insertions(+), 28 deletions(-) (limited to 'src/screens/profile') diff --git a/src/screens/profile/InviteFriendsScreen.tsx b/src/screens/profile/InviteFriendsScreen.tsx index e1f739c5..87b00aaf 100644 --- a/src/screens/profile/InviteFriendsScreen.tsx +++ b/src/screens/profile/InviteFriendsScreen.tsx @@ -1,19 +1,28 @@ -import React, {useEffect, useState} from 'react'; +import {RouteProp} from '@react-navigation/native'; +import React, {useEffect, useMemo, useState} from 'react'; import { - View, - Text, - TouchableOpacity, - SafeAreaView, - StyleSheet, - TextInput, FlatList, Keyboard, Linking, + SafeAreaView, + ScrollView, StatusBar, + StyleSheet, + Text, + TextInput, + TouchableOpacity, TouchableWithoutFeedback, - ScrollView, + View, } from 'react-native'; +import {checkPermission} from 'react-native-contacts'; +import Animated from 'react-native-reanimated'; +import Icon from 'react-native-vector-icons/Feather'; import {useDispatch, useStore} from 'react-redux'; +import {ProfilePreview, TabsGradient} from '../../components'; +import {InviteFriendTile} from '../../components/friends'; +import {TAGG_LIGHT_BLUE} from '../../constants'; +import {MainStackParams} from '../../routes'; +import {usersFromContactsService} from '../../services/UserFriendsService'; import {ProfilePreviewType} from '../../types'; import { extractContacts, @@ -25,15 +34,6 @@ import { SCREEN_WIDTH, StatusBarHeight, } from '../../utils'; -import {checkPermission} from 'react-native-contacts'; -import {usersFromContactsService} from '../../services/UserFriendsService'; -import {ProfilePreview, TabsGradient} from '../../components'; -import Animated from 'react-native-reanimated'; -import Icon from 'react-native-vector-icons/Feather'; -import {InviteFriendTile} from '../../components/friends'; -import {TAGG_LIGHT_BLUE} from '../../constants'; -import {MainStackParams} from '../../routes'; -import {RouteProp} from '@react-navigation/native'; const AnimatedIcon = Animated.createAnimatedComponent(Icon); export type InviteContactType = { @@ -42,9 +42,10 @@ export type InviteContactType = { phoneNumber: string; }; -type SearchResultType = { +export type SearchResultType = { usersFromContacts: ProfilePreviewType[]; nonUsersFromContacts: InviteContactType[]; + pendingUsers: InviteContactType[]; }; type InviteFriendsScreenRouteProp = RouteProp< @@ -64,9 +65,11 @@ const InviteFriendsScreen: React.FC = ({route}) => { ProfilePreviewType[] >([]); const [nonUsersFromContacts, setNonUsersFromContacts] = useState<[]>([]); + const [pendingUsers, setPendingUsers] = useState<[]>([]); const [results, setResults] = useState({ usersFromContacts: usersFromContacts, nonUsersFromContacts: nonUsersFromContacts, + pendingUsers: pendingUsers, }); const [query, setQuery] = useState(''); @@ -81,6 +84,7 @@ const InviteFriendsScreen: React.FC = ({route}) => { setResults({ usersFromContacts: response.existing_tagg_users, nonUsersFromContacts: response.invite_from_contacts, + pendingUsers: response.pending_users, }); } else { Linking.openSettings(); @@ -120,6 +124,7 @@ const InviteFriendsScreen: React.FC = ({route}) => { setResults({ usersFromContacts: usersFromContacts, nonUsersFromContacts: nonUsersFromContacts, + pendingUsers: pendingUsers, }); } }; @@ -168,6 +173,48 @@ const InviteFriendsScreen: React.FC = ({route}) => { ); + const PendingList = useMemo( + () => ( + item.phoneNumber} + renderItem={({item}) => ( + + )} + /> + ), + [results.pendingUsers], + ); + + const InviteList = useMemo( + () => ( + item.phoneNumber} + renderItem={({item}) => ( + + )} + /> + ), + [results.nonUsersFromContacts], + ); + return ( @@ -210,19 +257,12 @@ const InviteFriendsScreen: React.FC = ({route}) => { - Contacts on Tagg - + Pending Users + {PendingList} Invite your friends! - item.phoneNumber} - renderItem={({item}) => } - /> + {InviteList} -- cgit v1.2.3-70-g09d2 From e5e6328a1189ebb3f78e6eee4213e0b0519f716a Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 14 May 2021 16:42:56 -0700 Subject: moved user from contacts code to legacy --- src/screens/main/NotificationsScreen.tsx | 4 +- src/screens/profile/InviteFriendsScreen.tsx | 90 +------------------ src/screens/profile/legacy/UsersFromContacts.tsx | 106 +++++++++++++++++++++++ 3 files changed, 110 insertions(+), 90 deletions(-) create mode 100644 src/screens/profile/legacy/UsersFromContacts.tsx (limited to 'src/screens/profile') diff --git a/src/screens/main/NotificationsScreen.tsx b/src/screens/main/NotificationsScreen.tsx index 7e2f082c..bce48ef2 100644 --- a/src/screens/main/NotificationsScreen.tsx +++ b/src/screens/main/NotificationsScreen.tsx @@ -259,9 +259,7 @@ const NotificationsScreen: React.FC = () => { onPress={async () => { const permission = await checkPermission(); if (permission === 'authorized') { - navigation.navigate('InviteFriendsScreen', { - screenType: ScreenType.Profile, - }); + navigation.navigate('InviteFriendsScreen'); } else { Alert.alert( '"Tagg" Would Like to Access Your Contacts', diff --git a/src/screens/profile/InviteFriendsScreen.tsx b/src/screens/profile/InviteFriendsScreen.tsx index 87b00aaf..b3653d39 100644 --- a/src/screens/profile/InviteFriendsScreen.tsx +++ b/src/screens/profile/InviteFriendsScreen.tsx @@ -10,23 +10,19 @@ import { StyleSheet, Text, TextInput, - TouchableOpacity, TouchableWithoutFeedback, View, } from 'react-native'; import {checkPermission} from 'react-native-contacts'; import Animated from 'react-native-reanimated'; import Icon from 'react-native-vector-icons/Feather'; -import {useDispatch, useStore} from 'react-redux'; -import {ProfilePreview, TabsGradient} from '../../components'; +import {TabsGradient} from '../../components'; import {InviteFriendTile} from '../../components/friends'; -import {TAGG_LIGHT_BLUE} from '../../constants'; import {MainStackParams} from '../../routes'; import {usersFromContactsService} from '../../services/UserFriendsService'; import {ProfilePreviewType} from '../../types'; import { extractContacts, - handleAddFriend, HeaderHeight, isIPhoneX, normalize, @@ -57,15 +53,12 @@ interface InviteFriendsScreenProps { route: InviteFriendsScreenRouteProp; } -const InviteFriendsScreen: React.FC = ({route}) => { - const {screenType} = route.params; - const dispatch = useDispatch(); - const state = useStore().getState(); +const InviteFriendsScreen: React.FC = ({}) => { const [usersFromContacts, setUsersFromContacts] = useState< ProfilePreviewType[] >([]); const [nonUsersFromContacts, setNonUsersFromContacts] = useState<[]>([]); - const [pendingUsers, setPendingUsers] = useState<[]>([]); + const [pendingUsers] = useState<[]>([]); const [results, setResults] = useState({ usersFromContacts: usersFromContacts, nonUsersFromContacts: nonUsersFromContacts, @@ -131,48 +124,6 @@ const InviteFriendsScreen: React.FC = ({route}) => { search(); }, [query]); - const UsersFromContacts = () => ( - <> - item.username} - renderItem={({item}) => ( - - - - - { - handleAddFriend(screenType, item, dispatch, state).then( - (success) => { - if (success) { - let users = usersFromContacts; - const filteredUsers = users.filter( - (user) => user.username !== item.username, - ); - setResults({ - ...results, - usersFromContacts: filteredUsers, - }); - } - }, - ); - }}> - Add Friend - - - )} - /> - - ); - const PendingList = useMemo( () => ( = ({ + screenType, + results, + setResults, +}) => { + const dispatch = useDispatch(); + const state: RootState = useStore().getState(); + return ( + <> + item.username} + renderItem={({item}) => ( + + + + + { + handleAddFriend(screenType, item, dispatch, state).then( + (success) => { + if (success) { + let users = results.usersFromContacts; + const filteredUsers = users.filter( + (user) => user.username !== item.username, + ); + setResults({ + ...results, + usersFromContacts: filteredUsers, + }); + } + }, + ); + }}> + Add Friend + + + )} + /> + + ); +}; + +export default UsersFromContacts; + +const styles = StyleSheet.create({ + ppContainer: { + alignSelf: 'center', + flexDirection: 'row', + justifyContent: 'space-between', + width: '100%', + height: normalize(42), + alignItems: 'center', + marginBottom: '5%', + marginHorizontal: 10, + }, + friend: { + alignSelf: 'center', + height: '100%', + }, + addFriendButton: { + alignSelf: 'center', + justifyContent: 'center', + alignItems: 'center', + width: 82, + height: 25, + borderColor: TAGG_LIGHT_BLUE, + borderWidth: 2, + borderRadius: 2, + padding: 0, + backgroundColor: TAGG_LIGHT_BLUE, + }, + addFriendButtonTitle: { + color: 'white', + padding: 0, + fontSize: normalize(11), + fontWeight: '700', + lineHeight: normalize(13.13), + letterSpacing: normalize(0.6), + paddingHorizontal: '3.8%', + }, +}); -- cgit v1.2.3-70-g09d2 From 4591ff7a85c1582566981f22dbb828f4cfc48b57 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 14 May 2021 17:11:34 -0700 Subject: removed users from contacts list --- src/screens/profile/InviteFriendsScreen.tsx | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/screens/profile') diff --git a/src/screens/profile/InviteFriendsScreen.tsx b/src/screens/profile/InviteFriendsScreen.tsx index b3653d39..8f5acebf 100644 --- a/src/screens/profile/InviteFriendsScreen.tsx +++ b/src/screens/profile/InviteFriendsScreen.tsx @@ -39,7 +39,6 @@ export type InviteContactType = { }; export type SearchResultType = { - usersFromContacts: ProfilePreviewType[]; nonUsersFromContacts: InviteContactType[]; pendingUsers: InviteContactType[]; }; @@ -60,7 +59,6 @@ const InviteFriendsScreen: React.FC = ({}) => { const [nonUsersFromContacts, setNonUsersFromContacts] = useState<[]>([]); const [pendingUsers] = useState<[]>([]); const [results, setResults] = useState({ - usersFromContacts: usersFromContacts, nonUsersFromContacts: nonUsersFromContacts, pendingUsers: pendingUsers, }); @@ -75,7 +73,6 @@ const InviteFriendsScreen: React.FC = ({}) => { await setUsersFromContacts(response.existing_tagg_users); await setNonUsersFromContacts(response.invite_from_contacts); setResults({ - usersFromContacts: response.existing_tagg_users, nonUsersFromContacts: response.invite_from_contacts, pendingUsers: response.pending_users, }); @@ -115,7 +112,6 @@ const InviteFriendsScreen: React.FC = ({}) => { setResults(sanitizedResult); } else { setResults({ - usersFromContacts: usersFromContacts, nonUsersFromContacts: nonUsersFromContacts, pendingUsers: pendingUsers, }); -- cgit v1.2.3-70-g09d2 From 89685a45822ece75d6d075e581397968f538cfbf Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 14 May 2021 17:34:48 -0700 Subject: padding issue fixed --- src/screens/profile/InviteFriendsScreen.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/screens/profile') diff --git a/src/screens/profile/InviteFriendsScreen.tsx b/src/screens/profile/InviteFriendsScreen.tsx index 8f5acebf..06752dd4 100644 --- a/src/screens/profile/InviteFriendsScreen.tsx +++ b/src/screens/profile/InviteFriendsScreen.tsx @@ -203,7 +203,11 @@ const InviteFriendsScreen: React.FC = ({}) => { /> - + Pending Users {PendingList} -- cgit v1.2.3-70-g09d2 From d701ab9d521825a5494090b02ce9e56a79ef8e31 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Tue, 18 May 2021 16:49:27 -0700 Subject: fix undefined pending users length --- src/screens/profile/InviteFriendsScreen.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/screens/profile') diff --git a/src/screens/profile/InviteFriendsScreen.tsx b/src/screens/profile/InviteFriendsScreen.tsx index 06752dd4..bf91e8f3 100644 --- a/src/screens/profile/InviteFriendsScreen.tsx +++ b/src/screens/profile/InviteFriendsScreen.tsx @@ -206,7 +206,11 @@ const InviteFriendsScreen: React.FC = ({}) => { Pending Users {PendingList} -- cgit v1.2.3-70-g09d2 From 5bafa8fd6a90ef75f89251dfa13ec21dc73ac99d Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 14 May 2021 06:47:14 -0700 Subject: Added invites to header, organized imports --- src/components/friends/InviteFriendTile.tsx | 25 ++++++++++++++-------- src/constants/strings.ts | 1 + src/screens/profile/InviteFriendsScreen.tsx | 33 +++++++++++++++++++++++++---- 3 files changed, 46 insertions(+), 13 deletions(-) (limited to 'src/screens/profile') diff --git a/src/components/friends/InviteFriendTile.tsx b/src/components/friends/InviteFriendTile.tsx index 48f65a94..d384ed27 100644 --- a/src/components/friends/InviteFriendTile.tsx +++ b/src/components/friends/InviteFriendTile.tsx @@ -1,3 +1,4 @@ +import {useNavigation} from '@react-navigation/core'; import React, {useEffect, useState} from 'react'; import { Alert, @@ -9,11 +10,10 @@ import { View, } from 'react-native'; import {useSelector} from 'react-redux'; -import {RootState} from 'src/store/rootReducer'; import {TAGG_LIGHT_BLUE} from '../../constants'; import { + ERROR_FAILED_TO_INVITE_CONTACT, ERROR_NO_CONTACT_INVITE_LEFT, - ERROR_SOMETHING_WENT_WRONG, INVITE_USER_SMS_BODY, SUCCESS_CONFIRM_INVITE_CONTACT_MESSAGE, SUCCESS_CONFIRM_INVITE_CONTACT_TITLE, @@ -23,7 +23,8 @@ import { InviteContactType, SearchResultType, } from '../../screens/profile/InviteFriendsScreen'; -import {getRemainingInviteCount, inviteFriendService} from '../../services'; +import {inviteFriendService} from '../../services'; +import {RootState} from '../../store/rootReducer'; import {normalize} from '../../utils'; interface InviteFriendTileProps { @@ -31,18 +32,22 @@ interface InviteFriendTileProps { remind: boolean; results: SearchResultType; setResults: Function; + invitesLeft: number; + setInvitesLeft: (updateInvites: number) => void; } const InviteFriendTile: React.FC = ({ item, + invitesLeft, + setInvitesLeft, remind, results, setResults, }) => { + const navigation = useNavigation(); const [invited, setInvited] = useState(remind); const {name} = useSelector((state: RootState) => state.user.profile); const [formatedPhoneNumber, setFormattedPhoneNumber] = useState(''); - const handleInviteFriend = async () => { // If user has been invited already, don't show alerts and change invite count if (invited) { @@ -54,6 +59,7 @@ const InviteFriendTile: React.FC = ({ ); const inviteCode = response?.invite_code; if (inviteCode) { + // Open iMessage Linking.openURL( `sms:${item.phoneNumber}&body=${INVITE_USER_SMS_BODY( item.firstName, @@ -63,12 +69,11 @@ const InviteFriendTile: React.FC = ({ ); } } else { - const invites_left = await getRemainingInviteCount(); - if (invites_left < 1) { + if (invitesLeft < 1) { Alert.alert(ERROR_NO_CONTACT_INVITE_LEFT); } Alert.alert( - SUCCESS_CONFIRM_INVITE_CONTACT_TITLE(invites_left), + SUCCESS_CONFIRM_INVITE_CONTACT_TITLE(String(invitesLeft)), SUCCESS_CONFIRM_INVITE_CONTACT_MESSAGE, [ {text: 'No!', style: 'cancel'}, @@ -83,7 +88,8 @@ const InviteFriendTile: React.FC = ({ ); const inviteCode = response?.invite_code; if (!inviteCode) { - Alert.alert(ERROR_SOMETHING_WENT_WRONG); + setInvited(false); + Alert.alert(ERROR_FAILED_TO_INVITE_CONTACT); } // Add user to Pending Users list const newPendingUser: InviteContactType = { @@ -110,6 +116,7 @@ const InviteFriendTile: React.FC = ({ // Update results after navigating out of the app setTimeout(() => { setInvited(true); + setInvitesLeft(invitesLeft - 1); setResults({ ...results, pendingUsers: [...results.pendingUsers, newPendingUser], @@ -117,7 +124,7 @@ const InviteFriendTile: React.FC = ({ }); }, 500); - if (invites_left === 1) { + if (invitesLeft === 1) { Alert.alert(SUCCESS_LAST_CONTACT_INVITE); } }, diff --git a/src/constants/strings.ts b/src/constants/strings.ts index 2ce64aed..a1064f49 100644 --- a/src/constants/strings.ts +++ b/src/constants/strings.ts @@ -21,6 +21,7 @@ export const ERROR_FAILED_LOGIN_INFO = 'Login failed, please try re-entering you export const ERROR_FAILED_TO_COMMENT = 'Unable to post comment, refresh and try again!'; export const ERROR_FAILED_TO_CREATE_CHANNEL = 'Failed to create a channel, Please try again!'; export const ERROR_FAILED_TO_DELETE_COMMENT = 'Unable to delete comment, refresh and try again!'; +export const ERROR_FAILED_TO_INVITE_CONTACT = `Unable to invite contact, refresh and try again!`; export const ERROR_INVALID_INVITATION_CODE = 'Invitation code invalid, try again or talk to the friend that sent it 😬'; export const ERROR_INVALID_LOGIN = 'Invalid login, Please login again'; export const ERROR_INVALID_PWD_CODE = 'Looks like you have entered the wrong code, please try again'; diff --git a/src/screens/profile/InviteFriendsScreen.tsx b/src/screens/profile/InviteFriendsScreen.tsx index bf91e8f3..24a4c821 100644 --- a/src/screens/profile/InviteFriendsScreen.tsx +++ b/src/screens/profile/InviteFriendsScreen.tsx @@ -1,4 +1,4 @@ -import {RouteProp} from '@react-navigation/native'; +import {RouteProp, useNavigation} from '@react-navigation/native'; import React, {useEffect, useMemo, useState} from 'react'; import { FlatList, @@ -18,8 +18,11 @@ import Animated from 'react-native-reanimated'; import Icon from 'react-native-vector-icons/Feather'; import {TabsGradient} from '../../components'; import {InviteFriendTile} from '../../components/friends'; -import {MainStackParams} from '../../routes'; -import {usersFromContactsService} from '../../services/UserFriendsService'; +import {headerBarOptions, MainStackParams} from '../../routes'; +import { + getRemainingInviteCount, + usersFromContactsService, +} from '../../services/UserFriendsService'; import {ProfilePreviewType} from '../../types'; import { extractContacts, @@ -52,7 +55,8 @@ interface InviteFriendsScreenProps { route: InviteFriendsScreenRouteProp; } -const InviteFriendsScreen: React.FC = ({}) => { +const InviteFriendsScreen: React.FC = ({route}) => { + const navigation = useNavigation(); const [usersFromContacts, setUsersFromContacts] = useState< ProfilePreviewType[] >([]); @@ -63,7 +67,24 @@ const InviteFriendsScreen: React.FC = ({}) => { pendingUsers: pendingUsers, }); const [query, setQuery] = useState(''); + const [invitesLeft, setInvitesLeft] = useState(0); + + useEffect(() => { + // Get number of invites from the backend and set the state + const getInitialInvitesCount = async () => { + const intialInvites = await getRemainingInviteCount(); + setInvitesLeft(intialInvites); + }; + getInitialInvitesCount(); + }, []); + useEffect( + () => + navigation.setOptions({ + ...headerBarOptions('black', `You have ${invitesLeft} Invites`), + }), + [invitesLeft], + ); useEffect(() => { const handleFindFriends = () => { extractContacts().then(async (retrievedContacts) => { @@ -132,6 +153,8 @@ const InviteFriendsScreen: React.FC = ({}) => { @@ -153,6 +176,8 @@ const InviteFriendsScreen: React.FC = ({}) => { -- cgit v1.2.3-70-g09d2 From db9c1d584403eddd49666d031d1f37f387720b44 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Thu, 20 May 2021 14:42:02 -0700 Subject: lint errors --- src/components/friends/InviteFriendTile.tsx | 1 - src/routes/main/MainStackNavigator.tsx | 4 +--- src/screens/profile/InviteFriendsScreen.tsx | 12 ++---------- 3 files changed, 3 insertions(+), 14 deletions(-) (limited to 'src/screens/profile') diff --git a/src/components/friends/InviteFriendTile.tsx b/src/components/friends/InviteFriendTile.tsx index d384ed27..15648902 100644 --- a/src/components/friends/InviteFriendTile.tsx +++ b/src/components/friends/InviteFriendTile.tsx @@ -44,7 +44,6 @@ const InviteFriendTile: React.FC = ({ results, setResults, }) => { - const navigation = useNavigation(); const [invited, setInvited] = useState(remind); const {name} = useSelector((state: RootState) => state.user.profile); const [formatedPhoneNumber, setFormattedPhoneNumber] = useState(''); diff --git a/src/routes/main/MainStackNavigator.tsx b/src/routes/main/MainStackNavigator.tsx index 3b183cc0..8f2192f1 100644 --- a/src/routes/main/MainStackNavigator.tsx +++ b/src/routes/main/MainStackNavigator.tsx @@ -92,9 +92,7 @@ export type MainStackParams = { badge_title: string; badge_img: string; }; - InviteFriendsScreen: { - screenType: ScreenType; - }; + InviteFriendsScreen: undefined; SPWelcomeScreen: {}; ChatList: undefined; Chat: undefined; diff --git a/src/screens/profile/InviteFriendsScreen.tsx b/src/screens/profile/InviteFriendsScreen.tsx index 24a4c821..49acf1b7 100644 --- a/src/screens/profile/InviteFriendsScreen.tsx +++ b/src/screens/profile/InviteFriendsScreen.tsx @@ -46,16 +46,7 @@ export type SearchResultType = { pendingUsers: InviteContactType[]; }; -type InviteFriendsScreenRouteProp = RouteProp< - MainStackParams, - 'InviteFriendsScreen' ->; - -interface InviteFriendsScreenProps { - route: InviteFriendsScreenRouteProp; -} - -const InviteFriendsScreen: React.FC = ({route}) => { +const InviteFriendsScreen: React.FC = () => { const navigation = useNavigation(); const [usersFromContacts, setUsersFromContacts] = useState< ProfilePreviewType[] @@ -85,6 +76,7 @@ const InviteFriendsScreen: React.FC = ({route}) => { }), [invitesLeft], ); + useEffect(() => { const handleFindFriends = () => { extractContacts().then(async (retrievedContacts) => { -- cgit v1.2.3-70-g09d2 From ccb37b8a49cb0a1b50ab3731a59c8c09b8aca62b Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Thu, 20 May 2021 15:39:26 -0700 Subject: Fix lint --- src/components/friends/InviteFriendTile.tsx | 1 - src/screens/profile/InviteFriendsScreen.tsx | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src/screens/profile') diff --git a/src/components/friends/InviteFriendTile.tsx b/src/components/friends/InviteFriendTile.tsx index 15648902..f990df6a 100644 --- a/src/components/friends/InviteFriendTile.tsx +++ b/src/components/friends/InviteFriendTile.tsx @@ -1,4 +1,3 @@ -import {useNavigation} from '@react-navigation/core'; import React, {useEffect, useState} from 'react'; import { Alert, diff --git a/src/screens/profile/InviteFriendsScreen.tsx b/src/screens/profile/InviteFriendsScreen.tsx index 49acf1b7..4f6319f7 100644 --- a/src/screens/profile/InviteFriendsScreen.tsx +++ b/src/screens/profile/InviteFriendsScreen.tsx @@ -1,4 +1,4 @@ -import {RouteProp, useNavigation} from '@react-navigation/native'; +import {useNavigation} from '@react-navigation/native'; import React, {useEffect, useMemo, useState} from 'react'; import { FlatList, @@ -18,7 +18,7 @@ import Animated from 'react-native-reanimated'; import Icon from 'react-native-vector-icons/Feather'; import {TabsGradient} from '../../components'; import {InviteFriendTile} from '../../components/friends'; -import {headerBarOptions, MainStackParams} from '../../routes'; +import {headerBarOptions} from '../../routes'; import { getRemainingInviteCount, usersFromContactsService, -- cgit v1.2.3-70-g09d2