From ca9b7a1a93ece72d4fdb80da42cb1c58b13c5eb9 Mon Sep 17 00:00:00 2001 From: Carlos Feliciano-Barba Date: Tue, 1 Aug 2023 14:56:23 -0400 Subject: [PATCH 01/16] Load video with the embed_video_url if it exists This fixes issues with embed links that could've been rendered using the Video component --- src/features/post/detail/PostDetail.tsx | 16 +++++--- src/features/post/inFeed/large/LargePost.tsx | 41 +++++++++++--------- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/src/features/post/detail/PostDetail.tsx b/src/features/post/detail/PostDetail.tsx index 56c4f9d01c..e2c08c1374 100644 --- a/src/features/post/detail/PostDetail.tsx +++ b/src/features/post/detail/PostDetail.tsx @@ -173,11 +173,13 @@ export default function PostDetail({ function renderImage() { if (!post) return; - if (post.post.url) { - if (isUrlImage(post.post.url)) return ; + if (post.post.url && isUrlImage(post.post.url)) { + return ; + } - if (isUrlVideo(post.post.url)) - return