From 95f00471cec3198b8a68fd42206b3781b573cc84 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Wed, 4 Nov 2020 11:15:44 -0500 Subject: not show things if gets deleted (#104) --- src/components/taggs/TwitterTaggPost.tsx | 99 +++++++++++++++++--------------- 1 file changed, 52 insertions(+), 47 deletions(-) (limited to 'src') diff --git a/src/components/taggs/TwitterTaggPost.tsx b/src/components/taggs/TwitterTaggPost.tsx index 2b064610..158b5995 100644 --- a/src/components/taggs/TwitterTaggPost.tsx +++ b/src/components/taggs/TwitterTaggPost.tsx @@ -73,54 +73,58 @@ const TwitterTaggPost: React.FC = ({ )} {/* Third part of content is the reply/retweet container or empty */} {(post.type === 'reply' || post.type === 'retweet') && - post.in_reply_to ? ( - - - - - - openTwitterProfileLink(post.in_reply_to?.handle) - }> - @{post.in_reply_to.handle} + post.in_reply_to && ( + + + + {post.in_reply_to.text !== 'This tweet is unavailable' && ( + <> + + + openTwitterProfileLink(post.in_reply_to?.handle) + }> + @{post.in_reply_to.handle} + + {/* We're not displaying any images here in the container */} + ` • ${date}`} + /> + + )} + + + {post.in_reply_to.text} - {/* We're not displaying any images here in the container */} - ` • ${date}`} - /> + {post.in_reply_to.permalink && ( + { + if (post.in_reply_to?.permalink) { + Linking.openURL(post.in_reply_to?.permalink || ''); + } + }}> + Show this thread + + )} - - {post.in_reply_to.text} - - { - if (post.in_reply_to?.permalink) { - Linking.openURL(post.in_reply_to?.permalink || ''); - } - }}> - Show this thread - - - - ) : ( - - )} + + )} {/* Footer */} @@ -207,7 +211,7 @@ const styles = StyleSheet.create({ backgroundColor: '#1d0034', }, replyGradient: { - height: 150, + // height: 150, borderRadius: 15, justifyContent: 'center', alignItems: 'center', @@ -229,6 +233,7 @@ const styles = StyleSheet.create({ }, replyText: { fontSize: 15, + marginVertical: 20, color: 'white', }, replyShowThisThread: { -- cgit v1.2.3-70-g09d2