From 5cf616a6234b5f002318415e8e6f9ed73e10368d Mon Sep 17 00:00:00 2001
From: ankit-thanekar007 <ankit.thanekar007@gmail.com>
Date: Wed, 31 Mar 2021 14:08:03 -0700
Subject: Changes for empty contacts and text getting cut

---
 src/components/profile/Friends.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/profile/Friends.tsx')

diff --git a/src/components/profile/Friends.tsx b/src/components/profile/Friends.tsx
index 44f6bb48..b9ca4d7b 100644
--- a/src/components/profile/Friends.tsx
+++ b/src/components/profile/Friends.tsx
@@ -39,7 +39,7 @@ const Friends: React.FC<FriendsProps> = ({result, screenType, userId}) => {
         const permission = await checkPermission();
         if (permission === 'authorized') {
           let response = await usersFromContactsService(contacts);
-          await setUsersFromContacts(response.existing_tagg_users);
+          setUsersFromContacts(response.existing_tagg_users);
         } else {
           console.log('Authorize access to contacts');
         }
@@ -84,7 +84,7 @@ const Friends: React.FC<FriendsProps> = ({result, screenType, userId}) => {
 
   return (
     <>
-      {loggedInUser.userId === userId && (
+      {loggedInUser.userId === userId && usersFromContacts.length !== 0 && (
         <View style={styles.subheader}>
           <View style={styles.addFriendHeaderContainer}>
             <Text style={[styles.subheaderText]}>Contacts on tagg</Text>
-- 
cgit v1.2.3-70-g09d2


From f3a9e82020549b04834de6ac5a0ce1096f01e3f2 Mon Sep 17 00:00:00 2001
From: ankit-thanekar007 <ankit.thanekar007@gmail.com>
Date: Wed, 31 Mar 2021 14:33:40 -0700
Subject: tagg --> Tagg

---
 src/components/profile/Friends.tsx          | 4 ++--
 src/screens/profile/InviteFriendsScreen.tsx | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/components/profile/Friends.tsx')

diff --git a/src/components/profile/Friends.tsx b/src/components/profile/Friends.tsx
index b9ca4d7b..c1dca755 100644
--- a/src/components/profile/Friends.tsx
+++ b/src/components/profile/Friends.tsx
@@ -27,7 +27,7 @@ interface FriendsProps {
 const Friends: React.FC<FriendsProps> = ({result, screenType, userId}) => {
   const state: RootState = useStore().getState();
   const dispatch = useDispatch();
-  const {user: loggedInUser = NO_USER} = state;
+  const {user: loggedInUser = NO_USER} = state.user;
   const navigation = useNavigation();
   const [usersFromContacts, setUsersFromContacts] = useState<
     ProfilePreviewType[]
@@ -87,7 +87,7 @@ const Friends: React.FC<FriendsProps> = ({result, screenType, userId}) => {
       {loggedInUser.userId === userId && usersFromContacts.length !== 0 && (
         <View style={styles.subheader}>
           <View style={styles.addFriendHeaderContainer}>
-            <Text style={[styles.subheaderText]}>Contacts on tagg</Text>
+            <Text style={[styles.subheaderText]}>Contacts on Tagg</Text>
           </View>
           <UsersFromContacts />
         </View>
diff --git a/src/screens/profile/InviteFriendsScreen.tsx b/src/screens/profile/InviteFriendsScreen.tsx
index a9fa1404..ad9e382e 100644
--- a/src/screens/profile/InviteFriendsScreen.tsx
+++ b/src/screens/profile/InviteFriendsScreen.tsx
@@ -203,7 +203,7 @@ const InviteFriendsScreen: React.FC<InviteFriendsScreenProps> = ({route}) => {
               </Animated.View>
             </View>
             <View style={styles.subheader}>
-              <Text style={styles.subheaderText}>Contacts on tagg</Text>
+              <Text style={styles.subheaderText}>Contacts on Tagg</Text>
               <UsersFromContacts />
             </View>
             <View style={styles.subheader}>
-- 
cgit v1.2.3-70-g09d2

