From: Dessalines Date: Thu, 25 Apr 2019 03:57:07 +0000 (-0700) Subject: Removed some redundant code. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/readmes/%7B%7D/%7Bthis.state.post.url%7D?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 + ? + + : + + - +
+ +
+
+ } + + } +