diff options
author | Ivan Chen <ivan@tagg.id> | 2021-05-07 16:01:47 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-05-07 16:01:47 -0400 |
commit | 76bc8c5825f39257be6e7648d12b858f1e805569 (patch) | |
tree | b94d9570439ebfa42e6664144f124abe5d4113e3 /src/components/taggs/TwitterTaggPost.tsx | |
parent | 65c7411f4609edac3d4d5f23fc031ed274fc5872 (diff) | |
parent | c9d32e68fbb9d1bc175722bfda49454a6f627eae (diff) |
Merge branch 'master' into tma821-load-badges-faster-ft
# Conflicts:
# src/utils/users.ts
Diffstat (limited to 'src/components/taggs/TwitterTaggPost.tsx')
-rw-r--r-- | src/components/taggs/TwitterTaggPost.tsx | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/components/taggs/TwitterTaggPost.tsx b/src/components/taggs/TwitterTaggPost.tsx index 0a6f53d8..db07ba66 100644 --- a/src/components/taggs/TwitterTaggPost.tsx +++ b/src/components/taggs/TwitterTaggPost.tsx @@ -11,7 +11,7 @@ import { } from '../../constants'; import {TwitterPostType} from '../../types'; import {handleOpenSocialUrlOnBrowser, SCREEN_WIDTH} from '../../utils'; -import {DateLabel, PostCarousel} from '../common'; +import {Avatar, DateLabel, PostCarousel} from '../common'; interface TwitterTaggPostProps { ownerHandle: string; @@ -31,14 +31,7 @@ const TwitterTaggPost: React.FC<TwitterTaggPostProps> = ({ )} {/* Post header (avatar and handle) */} <View style={styles.header}> - <Image - style={styles.avatar} - source={ - post.profile_pic - ? {uri: post.profile_pic} - : require('../../assets/images/avatar-placeholder.png') - } - /> + <Avatar style={styles.avatar} uri={post.profile_pic} /> <Text style={styles.headerText} onPress={() => handleOpenSocialUrlOnBrowser(post.handle, 'Twitter')}> @@ -84,13 +77,9 @@ const TwitterTaggPost: React.FC<TwitterTaggPostProps> = ({ <View style={styles.replyHeader}> {post.in_reply_to.text !== 'This tweet is unavailable' && ( <> - <Image - style={styles.replyAvatar} - source={ - post.in_reply_to.profile_pic - ? {uri: post.in_reply_to.profile_pic} - : require('../../assets/images/avatar-placeholder.png') - } + <Avatar + style={styles.avatar} + uri={post.in_reply_to.profile_pic} /> <Text style={styles.replyHandleText} |