From: Alec Armbruster <35377827+alectrocute@users.noreply.github.com> Date: Thu, 22 Jun 2023 18:45:09 +0000 (-0400) Subject: bandaid fix our video embeds X-Git-Url: http://these/git/%22%7Burl%7D/static/%7BcommunityRss%7D?a=commitdiff_plain;h=7571f7ac69e930e0f3c9758792fdc09b87da0f70;p=lemmy-ui.git bandaid fix our video embeds --- diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index 4d0951b..93b8fff 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -239,25 +239,40 @@ export class PostListing extends Component { } get img() { - return this.imageSrc ? ( - <> -
- - - -
-
- - - + if (this.imageSrc) { + return ( + <> +
+ + + +
+
+ + + +
+ + ); + } + + const { post } = this.postView; + const { url } = post; + + if (url && isVideo(url)) { + return ( +
+
- - ) : ( - <> - ); + ); + } + + return <>; } imgThumb(src: string) { @@ -325,17 +340,19 @@ export class PostListing extends Component { } else if (url) { if (!this.props.hideImage && isVideo(url)) { return ( -
- -
+ +
+ +
+
); } else { return (