/** * External dependencies */ import { Container, Col } from '@automattic/jetpack-components'; /** * Internal dependencies */ import VideoCard from '../video-card'; import styles from './style.module.scss'; import { VideoGridProps } from './types'; import type React from 'react'; /** * Video Grid component * * @param {VideoGridProps} props - Component props. * @returns {React.ReactNode} - VideoGrid react component. */ const VideoGrid = ( { videos, count = 6, onVideoDetailsClick, loading }: VideoGridProps ) => { const gridVideos = videos.slice( 0, count ); const handleClickWithIndex = ( index, callback ) => () => { callback?.( videos[ index ] ); }; return (
{ gridVideos.map( ( video, index ) => { return ( ); } ) }
); }; export default VideoGrid;