aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-04-27 10:47:35 -0400
committerIvan Chen <ivan@tagg.id>2021-04-27 10:47:35 -0400
commita9b20af3889812b3d44ed1dedb75e4442eb35e8b (patch)
tree9053cf431fba88a43dbc6928dff5e8d2f9d45afa
parenta13dcb5110245bb554d79e779c4942e6f5aaf18a (diff)
missed a couple
-rw-r--r--src/components/search/SearchResultCell.tsx8
-rw-r--r--src/screens/chat/ChatResultsCell.tsx10
2 files changed, 5 insertions, 13 deletions
diff --git a/src/components/search/SearchResultCell.tsx b/src/components/search/SearchResultCell.tsx
index 5a6ea110..16e62a53 100644
--- a/src/components/search/SearchResultCell.tsx
+++ b/src/components/search/SearchResultCell.tsx
@@ -22,10 +22,10 @@ import {
} from '../../utils';
import {
checkIfUserIsBlocked,
- defaultUserProfile,
fetchUserX,
userXInStore,
} from '../../utils/users';
+import {Avatar} from '../common';
interface SearchResults {
profileData: ProfilePreviewType;
@@ -129,11 +129,7 @@ const SearchResultsCell: React.FC<SearchResults> = ({
<TouchableOpacity
onPress={addToRecentlyStoredAndNavigateToProfile}
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/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}>