import React, { FC, useMemo } from 'react'; import * as styles from './styles.scss'; import path from 'ramda/es/path'; import { INodeComponentProps } from '~/redux/node/constants'; interface IProps extends INodeComponentProps {} const NodeVideoBlock: FC = ({ node }) => { const video = useMemo(() => { const url: string = path(['blocks', 0, 'url'], node); const match = url && url.match( /http(?:s?):\/\/(?:www\.)?youtu(?:be\.com\/watch\?v=|\.be\/)([\w\-\_]*)(&(amp;)?[\w\?=]*)?/ ); return match && match[1]; }, [node]); return (