From 8da88460246dc05ce7b904ef87d57afca2667dd1 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 24 Apr 2019 20:57:07 -0700 Subject: [PATCH] Removed some redundant code. --- ui/src/components/post-listing.tsx | 53 +++++++++++++----------------- 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index 7a6e9545..40462eb6 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -67,44 +67,37 @@ export class PostListing extends Component { {post.url && isImage(post.url) && - + }
- {post.url - ?
-
{post.name} +
+
{post.name}
+ {post.url && + + {(new URL(post.url)).hostname} + + } {post.removed && removed } {post.locked && locked } -
- {(new URL(post.url)).hostname} - { isImage(post.url) && - <> - { !this.state.imageExpanded - ? + - : - - - -
- -
-
- } - - } -
- :
{post.name} - {post.removed && - removed - } - {post.locked && - locked - } -
- } + { post.url && isImage(post.url) && + <> + { !this.state.imageExpanded + ? + + : + + - +
+ +
+
+ } + + } +
    -- 2.44.1