import NextImage from "next/image"; import NextLink from "next/link"; import ReactPlayer from "react-player"; import IconClose from "../../images/icon-close.svg"; import { getTAUrl } from "../../lib/constants"; import { formatNumbers } from "../../lib/utils"; import { Data } from "../../types/video"; const TA_BASE_URL = getTAUrl(); type VideoPlayerProps = { selectedVideo: Data; handleRemoveVideoPlayer?: () => void; isHome?: boolean; showStats?: boolean; }; const VideoPlayer = ({ selectedVideo, handleRemoveVideoPlayer, isHome = true, showStats = true, }: VideoPlayerProps) => { if (!selectedVideo) return; return ( <> {selectedVideo && (