From cf8a5bd4ee65c882eceb5387b3fcd12c88f500f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Per=C3=B4nico=20Barbotin?= Date: Sun, 29 Oct 2023 11:17:26 -0300 Subject: [PATCH] =?UTF-8?q?Limpando=20c=C3=B3digo=20e=20fazendo=20com=20qu?= =?UTF-8?q?e=20nome=20do=20conte=C3=BAdo=20tamb=C3=A9m=20abra=20popup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GroupContents/GroupContentMaterials.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/pages/Group/GroupTabs/GroupContents/GroupContentMaterials.tsx b/src/pages/Group/GroupTabs/GroupContents/GroupContentMaterials.tsx index 41628b6d..7fe50511 100644 --- a/src/pages/Group/GroupTabs/GroupContents/GroupContentMaterials.tsx +++ b/src/pages/Group/GroupTabs/GroupContents/GroupContentMaterials.tsx @@ -116,9 +116,18 @@ export function GroupContentMaterials() { } } -
- {material.title} + { + youTubeMatch !== null + ? +
{ const videoId = (youTubeMatch[1] ?? youTubeMatch[2]); if(!isMiniature || videoId!= playingVideo) handleVideoClick(videoId)}}> + {material.title} +
+ : + + {material.title} + + }

{material.description}

@@ -129,7 +138,7 @@ export function GroupContentMaterials() { const videoId = videoUrl[1] ?? videoUrl[2]; return ( -
{ console.log("videoId: " + videoId+"\n playing: " + playingVideo + "\nMiniature: "+isMiniature);if(!isMiniature || videoId != playingVideo) handleVideoClick(videoId)}}> +
{if(!isMiniature || videoId != playingVideo) handleVideoClick(videoId)}}> { playingVideo == videoId