diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-06 12:13:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-06 12:13:32 -0400 |
commit | aac68b10d5f05f4a8bd137cfd2a85ef6f6e4dbdf (patch) | |
tree | 27c25da35cbae44fd264c88321bc2ede45ae34c9 /src | |
parent | fbcb7a01fa643a14ff73e2537f13d61b67e23ace (diff) | |
parent | f3a9e82020549b04834de6ac5a0ce1096f01e3f2 (diff) |
Merge pull request #347 from ankit-thanekar007/tma-754-add-onPress
[HOTFIX] : Changes for empty contacts and text getting cut
Diffstat (limited to 'src')
-rw-r--r-- | src/components/common/TaggPrompt.tsx | 2 | ||||
-rw-r--r-- | src/components/profile/Friends.tsx | 8 | ||||
-rw-r--r-- | src/screens/profile/InviteFriendsScreen.tsx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/components/common/TaggPrompt.tsx b/src/components/common/TaggPrompt.tsx index 721b1eb8..5e125d00 100644 --- a/src/components/common/TaggPrompt.tsx +++ b/src/components/common/TaggPrompt.tsx @@ -68,7 +68,7 @@ const styles = StyleSheet.create({ justifyContent: 'center', alignItems: 'center', backgroundColor: 'white', - height: isIPhoneX() ? SCREEN_HEIGHT / 6 : SCREEN_HEIGHT / 5, + height: SCREEN_HEIGHT / 4, }, closeButton: { position: 'relative', diff --git a/src/components/profile/Friends.tsx b/src/components/profile/Friends.tsx index 44f6bb48..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[] @@ -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,10 +84,10 @@ 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> + <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}> |