import React from 'react' import Link from 'next/link'; import VodCard from './vod-card'; import { IVtuber } from '@futureporn/types'; import { IVod } from '@/app/lib/vods'; import { getVodTitle } from './vod-page'; import { notFound } from 'next/navigation'; interface IVodsListProps { vtuber?: IVtuber; vods: IVod[]; page: number; pageSize: number; } interface IVodsListHeadingProps { slug: string; displayName: string; } export function VodsListHeading({ slug, displayName }: IVodsListHeadingProps): React.JSX.Element { return (

{displayName} Vods

) } export default function VodsList({ vods, page = 1, pageSize = 24 }: IVodsListProps): React.JSX.Element { // if (!vtuber) return
vtuber is not defined. vtuber:{JSON.stringify(vtuber, null, 2)}
// if (!vods) return
failed to load vods
; if (!vods) return notFound() // @todo [x] pagination // @todo [x] sortability return ( <> {/*

VodsList on page {page}, pageSize {pageSize}, with {vods.data.length} vods

*/} {/*
                
                    {JSON.stringify(vods.data, null, 2)}
                
            
*/}
{vods.map((vod: IVod) => ( ))}
); }