diff --git a/site/components/Link.js b/site/components/Link.js new file mode 100644 index 0000000..b1d97df --- /dev/null +++ b/site/components/Link.js @@ -0,0 +1,31 @@ +import Link from "next/link"; +import ReactPlayer from "react-player"; + +const videoLinks = [ + "youtube.com", + "dailymotion.com", + "vimeo.com", + "soundcloud.com", + "facebook.com/watch", + "twitch.com", +]; + +export const Paragraph = (props) => { + if ( + typeof props.children == "object" && + props.children.props && + props.children.props.href && + videoLinks.some((str) => props.children.props.href.includes(str)) + ) + return ( +