From: Dessalines Date: Thu, 25 Apr 2019 03:57:07 +0000 (-0700) Subject: Removed some redundant code. X-Git-Url: http://these/git/%7B?a=commitdiff_plain;h=8da88460246dc05ce7b904ef87d57afca2667dd1;p=lemmy.git Removed some redundant code. --- 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 + ? + + : + + - +
+ +
+
+ } + + } +