diff --git a/site/components/Link.js b/site/components/Link.js index b1d97df..0cb260e 100644 --- a/site/components/Link.js +++ b/site/components/Link.js @@ -1,31 +1,30 @@ -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", -]; +import TwitterEmbed from "./TwitterEmbed"; +import { YOUTUBE_REGEX, TWITTER_REGEX } from "../lib/constants"; 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 ( -