From afa0e032e7d05407b6ee23c9b24837cdd1b7e537 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Fri, 3 Sep 2021 13:07:13 +0200 Subject: [PATCH] Add video listing page --- pages/watch/components/video-grid-item.tsx | 7 ++++--- pages/watch/index.tsx | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pages/watch/components/video-grid-item.tsx b/pages/watch/components/video-grid-item.tsx index 6f80f60ba..f25dfbf2d 100644 --- a/pages/watch/components/video-grid-item.tsx +++ b/pages/watch/components/video-grid-item.tsx @@ -1,6 +1,7 @@ import { Badge, Box, Heading, Link, Text } from '@chakra-ui/react'; type VideoGridItemProps = { + href: string; title: string; subtitle: string; date: string; @@ -52,10 +53,10 @@ const bgColorList = [ ]; export function VideoGridItem(props: VideoGridItemProps) { - const { title, subtitle, date, isNew = false, isPro = false, colorIndex = 0 } = props; + const { title, subtitle, date, isNew = false, isPro = false, colorIndex = 0, href } = props; return ( - {isNew && New} @@ -64,6 +65,6 @@ export function VideoGridItem(props: VideoGridItemProps) { {title} {subtitle} - + ); } diff --git a/pages/watch/index.tsx b/pages/watch/index.tsx index 42fc45d35..1f0dd1cd4 100644 --- a/pages/watch/index.tsx +++ b/pages/watch/index.tsx @@ -26,6 +26,7 @@ export default function Watch(props: VideosProps) { {videos.map((video, counter) => (