diff --git a/components/arcade/showcase/youtube-renderer.js b/components/arcade/showcase/youtube-renderer.js index 6b070e2b0..1344c7ff1 100644 --- a/components/arcade/showcase/youtube-renderer.js +++ b/components/arcade/showcase/youtube-renderer.js @@ -2,17 +2,28 @@ import LiteYouTubeEmbed from 'react-lite-youtube-embed'; import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css' const YoutubeRenderer = ({ youtubeLink }) => { - if (!youtubeLink) return null - const youtubeID = youtubeLink.split('v=')[1] - if (!youtubeID) return

Invalid YouTube link: "{youtubeLink}"

+ if (!youtubeLink) return null; + const isYouTubeLink = youtubeLink.includes('youtube.com') || youtubeLink.includes('youtu.be'); + if (isYouTubeLink) { + const youtubeID = youtubeLink.split('v=')[1]; + if (!youtubeID) return

Invalid YouTube link: "{youtubeLink}"

; + + return ( + + ); + } return ( - - ) -} + + ); +}; + export default YoutubeRenderer \ No newline at end of file