aboutsummaryrefslogtreecommitdiff
path: root/src/screens
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/chat/ChatResultsCell.tsx10
-rw-r--r--src/screens/onboarding/OnboardingStepThree.tsx5
-rw-r--r--src/screens/profile/SocialMediaTaggs.tsx2
3 files changed, 4 insertions, 13 deletions
diff --git a/src/screens/chat/ChatResultsCell.tsx b/src/screens/chat/ChatResultsCell.tsx
index e1eb97dd..14062810 100644
--- a/src/screens/chat/ChatResultsCell.tsx
+++ b/src/screens/chat/ChatResultsCell.tsx
@@ -1,13 +1,13 @@
import {useNavigation} from '@react-navigation/native';
import React, {useContext, useEffect, useState} from 'react';
-import {Alert, Image, StyleSheet, Text, View} from 'react-native';
+import {Alert, StyleSheet, Text, View} from 'react-native';
import {TouchableOpacity} from 'react-native-gesture-handler';
import {ChatContext} from '../../App';
+import {Avatar} from '../../components';
import {ERROR_FAILED_TO_CREATE_CHANNEL} from '../../constants/strings';
import {loadImageFromURL} from '../../services';
import {ProfilePreviewType, UserType} from '../../types';
import {createChannel, normalize, SCREEN_WIDTH} from '../../utils';
-import {defaultUserProfile} from '../../utils/users';
interface ChatResults {
profileData: ProfilePreviewType;
@@ -58,11 +58,7 @@ const ChatResultsCell: React.FC<ChatResults> = ({
<TouchableOpacity
onPress={createChannelIfNotPresentAndNavigate}
style={styles.cellContainer}>
- <Image
- defaultSource={defaultUserProfile()}
- source={{uri: avatar}}
- style={styles.imageContainer}
- />
+ <Avatar style={styles.imageContainer} uri={avatar} />
<View style={[styles.initialTextContainer, styles.multiText]}>
<Text style={styles.initialTextStyle}>{`@${username}`}</Text>
<Text style={styles.secondaryTextStyle}>
diff --git a/src/screens/onboarding/OnboardingStepThree.tsx b/src/screens/onboarding/OnboardingStepThree.tsx
index 638f0889..34173b39 100644
--- a/src/screens/onboarding/OnboardingStepThree.tsx
+++ b/src/screens/onboarding/OnboardingStepThree.tsx
@@ -27,7 +27,6 @@ import {
ERROR_SELECT_CLASS_YEAR,
ERROR_SELECT_GENDER,
ERROR_SELECT_UNIVERSITY,
- ERROR_UPLOAD_SMALL_PROFILE_PIC,
} from '../../constants/strings';
import {OnboardingStackParams} from '../../routes/onboarding';
import {patchEditProfile} from '../../services';
@@ -160,10 +159,6 @@ const OnboardingStepThree: React.FC<OnboardingStepThreeProps> = ({
};
const handleSubmit = async () => {
- if (!form.smallPic) {
- Alert.alert(ERROR_UPLOAD_SMALL_PROFILE_PIC);
- return;
- }
if (form.classYear === -1) {
Alert.alert(ERROR_SELECT_CLASS_YEAR);
return;
diff --git a/src/screens/profile/SocialMediaTaggs.tsx b/src/screens/profile/SocialMediaTaggs.tsx
index 9186f187..52d20683 100644
--- a/src/screens/profile/SocialMediaTaggs.tsx
+++ b/src/screens/profile/SocialMediaTaggs.tsx
@@ -59,7 +59,7 @@ const SocialMediaTaggs: React.FC<SocialMediaTaggsProps> = ({
useEffect(() => {
navigation.setOptions({
headerTitle: () => {
- return <AvatarTitle avatar={avatar ?? null} />;
+ return <AvatarTitle avatar={avatar} />;
},
});
}, [avatar, navigation]);