diff --git a/package.json b/package.json index ca720cff..43e726e8 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "react-lazyload": "^3.2.0", "react-masonry-css": "^1.0.16", "react-popper": "^2.2.3", + "react-resize-detector": "^12.0.2", "react-router": "^5.1.2", "react-router-dom": "^5.1.2", "react-sticky-box": "^1.0.2", diff --git a/src/containers/node/NodeComments/components/Comment/components/CommentContent/components/CommentEmbedBlock/components/CommentVideoFrame/index.tsx b/src/containers/node/NodeComments/components/Comment/components/CommentContent/components/CommentEmbedBlock/components/CommentVideoFrame/index.tsx new file mode 100644 index 00000000..686e6dd1 --- /dev/null +++ b/src/containers/node/NodeComments/components/Comment/components/CommentContent/components/CommentEmbedBlock/components/CommentVideoFrame/index.tsx @@ -0,0 +1,28 @@ +import classNames from 'classnames'; +import { useResizeDetector } from 'react-resize-detector'; + +import styles from './styles.module.scss'; + +interface Props { + id: string; + title: string; + className?: string; +} + +export const CommentVideoFrame = ({ id, title, className }: Props) => { + const { ref, width = 0, height = 0 } = useResizeDetector(); + + return ( +
+