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') 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