From: Dessalines Date: Mon, 17 Feb 2020 17:45:08 +0000 (-0500) Subject: Only show it if it has a title. X-Git-Url: http://these/git/%22https:/join-lemmy.org/static/git-logo.png?a=commitdiff_plain;h=6c28851fe88d2120ac84c118ff76ab28186a0788;p=lemmy.git Only show it if it has a title. --- diff --git a/ui/src/components/iframely-card.tsx b/ui/src/components/iframely-card.tsx index 73f3cef7..a9193528 100644 --- a/ui/src/components/iframely-card.tsx +++ b/ui/src/components/iframely-card.tsx @@ -27,60 +27,62 @@ export class IFramelyCard extends Component< let iframely = this.props.iframely; return ( <> -
-
- {iframely.thumbnail_url && ( -
- {iframely.html ? ( - - - - ) : ( - - )} -
- )} -
-
-
- - - {iframely.title} - - -
- - - {new URL(iframely.url).hostname} - - - - - {iframely.html && ( + {iframely.title && ( +
+
+ {iframely.thumbnail_url && ( +
+ {iframely.html ? ( - {this.state.expanded ? '[-]' : '[+]'} + + ) : ( + )} - - {iframely.description && ( -
- )} +
+ )} +
+
+
+ + + {iframely.title} + + +
+ + + {new URL(iframely.url).hostname} + + + + + {iframely.html && ( + + {this.state.expanded ? '[-]' : '[+]'} + + )} + + {iframely.description && ( +
+ )} +
-
+ )} {this.state.expanded && (