From 40f63baa052e6bc2b68aa0190d81dc5d54d81714 Mon Sep 17 00:00:00 2001
From: G <148180653+GxqoRR@users.noreply.github.com>
Date: Sun, 22 Oct 2023 09:13:16 -0700
Subject: [PATCH] Embed Youtube videos in posts for valid Youtube URLs (#572)
* Render video if it's valid Youtube URL
* Fix lint
---
components/text.js | 29 ++++++++++++++++++++++++++++-
components/text.module.css | 7 +++++++
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/components/text.js b/components/text.js
index 86738395..fb8df83a 100644
--- a/components/text.js
+++ b/components/text.js
@@ -1,5 +1,6 @@
import styles from './text.module.css'
import ReactMarkdown from 'react-markdown'
+import YouTube from 'react-youtube'
import gfm from 'remark-gfm'
import { LightAsync as SyntaxHighlighter } from 'react-syntax-highlighter'
import atomDark from 'react-syntax-highlighter/dist/cjs/styles/prism/atom-dark'
@@ -105,6 +106,25 @@ export default memo(function Text ({ nofollow, imgproxyUrls, children, tab, ...o
return