diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-27 10:46:17 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-04-27 10:46:17 -0400 |
commit | a13dcb5110245bb554d79e779c4942e6f5aaf18a (patch) | |
tree | bb8e5bebe2cf5677d0ffc9b72819a56c9d309cbf /src/components/messages/ChannelPreview.tsx | |
parent | caac607ed90c35ad8d4b2787b170e1fd1f165333 (diff) |
refactored avatar
Diffstat (limited to 'src/components/messages/ChannelPreview.tsx')
-rw-r--r-- | src/components/messages/ChannelPreview.tsx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/components/messages/ChannelPreview.tsx b/src/components/messages/ChannelPreview.tsx index 3d31d42a..878e5a6b 100644 --- a/src/components/messages/ChannelPreview.tsx +++ b/src/components/messages/ChannelPreview.tsx @@ -22,6 +22,7 @@ import { } from '../../types'; import {normalize, SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; import {getMember, isOnline} from '../../utils/messages'; +import {Avatar} from '../common'; const ChannelPreview: React.FC< ChannelPreviewMessengerProps< @@ -87,13 +88,9 @@ const ChannelPreview: React.FC< navigation.navigate('Chat'); }}> <View> - <Image + <Avatar style={styles.avatar} - source={ - member - ? {uri: member.user?.thumbnail_url} - : require('../../assets/images/avatar-placeholder.png') - } + uri={member?.user?.thumbnail_url as string} /> {online && <View style={styles.online} />} </View> |