import VodsList, { VodsListHeading } from '@/app/components/vods-list'; import { getVtuberBySlug, getUrl } from '@/app/lib/vtubers'; import { IVodsResponse, getVodsForVtuber } from '@/app/lib/vods'; import Pager from '@/app/components/pager'; import { notFound } from 'next/navigation'; interface IPageParams { params: { slug: string; page: string; }; } export default async function Page({ params }: IPageParams) { const pageNumber = parseInt(params.page); const pageSize = 24 console.log(`lets get us some vtuber and vods`); const vtuber = await getVtuberBySlug(params.slug); if (!vtuber) { console.error('getVtuberBySlug failed to get us a vtuber object.') return
failed to get vtuber
// return notFound(); } const {vods, count} = await getVodsForVtuber(vtuber.id, pageNumber, 24, true); if (!vods) { returnfailed to get vods
console.error('getVodsForVtuber failed to get us a vods object.') // return notFound(); } return ( <>