aboutsummaryrefslogtreecommitdiff
path: root/src/components/taggs/TwitterTaggPost.tsx
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-05-04 13:31:17 -0400
committerGitHub <noreply@github.com>2021-05-04 13:31:17 -0400
commit1441ef007549f24a292317f1e67c0de63cacbd2b (patch)
tree1b1fe4a21f257c468c321d49804f124c98a6e6b6 /src/components/taggs/TwitterTaggPost.tsx
parent5a8d92bcd869ada1079bc36b6598c899a8a9246d (diff)
parent64dedc2bc0c65fae604ba771ae4c17d1927ff1c2 (diff)
Merge pull request #392 from IvanIFChen/tma791-remove-profile-photo-requirement
[TMA-791] Removed profile photo requirement
Diffstat (limited to 'src/components/taggs/TwitterTaggPost.tsx')
-rw-r--r--src/components/taggs/TwitterTaggPost.tsx21
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}