import Link from 'next/link'; import Image from 'next/future/image'; import ProsCard from 'components/ProsCard'; import ConsCard from 'components/ConsCard'; import Unsplash from 'components/metrics/Unsplash'; import Analytics from 'components/metrics/Analytics'; import YouTube from 'components/metrics/Youtube'; import Step from 'components/Step'; import ImageWithTheme from 'components/ImageWithTheme'; const CustomLink = (props) => { const href = props.href; const isInternalLink = href && (href.startsWith('/') || href.startsWith('#')); if (isInternalLink) { return ( {props.children} ); } return ; }; function RoundedImage(props) { return {props.alt}; } function Callout(props) { return (
{props.emoji}
{props.children}
); } const MDXComponents = { Image: RoundedImage, ImageWithTheme, a: CustomLink, Callout, Analytics, ConsCard, ProsCard, Step, Unsplash, YouTube }; export default MDXComponents;