aboutsummaryrefslogtreecommitdiff
path: root/src/screens/chat/ChatResultsCell.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-05-07 16:01:47 -0400
committerIvan Chen <ivan@tagg.id>2021-05-07 16:01:47 -0400
commit76bc8c5825f39257be6e7648d12b858f1e805569 (patch)
treeb94d9570439ebfa42e6664144f124abe5d4113e3 /src/screens/chat/ChatResultsCell.tsx
parent65c7411f4609edac3d4d5f23fc031ed274fc5872 (diff)
parentc9d32e68fbb9d1bc175722bfda49454a6f627eae (diff)
Merge branch 'master' into tma821-load-badges-faster-ft
# Conflicts: # src/utils/users.ts
Diffstat (limited to 'src/screens/chat/ChatResultsCell.tsx')
-rw-r--r--src/screens/chat/ChatResultsCell.tsx10
1 files changed, 3 insertions, 7 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}>