2024-01-20 16:16:14 +00:00
|
|
|
|
2024-07-10 22:11:18 +00:00
|
|
|
import VodsList, { VodsListHeading } from '@/app/components/vods-list'
|
|
|
|
import { getVtuberBySlug, getUrl } from '@/app/lib/vtubers'
|
|
|
|
import { IVodsResponse, getVodsForVtuber, getPaginatedUrl } from '@/app/lib/vods'
|
|
|
|
import Pager from '@/app/components/pager'
|
2024-01-20 16:16:14 +00:00
|
|
|
import { notFound } from 'next/navigation'
|
|
|
|
|
|
|
|
interface IPageParams {
|
|
|
|
params: {
|
|
|
|
slug: string;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default async function Page({ params }: IPageParams) {
|
|
|
|
const vtuber = await getVtuberBySlug(params.slug)
|
2024-12-12 07:23:46 +00:00
|
|
|
const pageCount = 24
|
2024-01-20 16:16:14 +00:00
|
|
|
if (!vtuber) notFound();
|
2024-12-12 07:23:46 +00:00
|
|
|
const vods = await getVodsForVtuber(vtuber.id, 1, pageCount)
|
2024-01-20 16:16:14 +00:00
|
|
|
if (!vods) notFound();
|
|
|
|
return (
|
|
|
|
<>
|
2024-12-12 07:23:46 +00:00
|
|
|
<pre>
|
|
|
|
<code>
|
|
|
|
{JSON.stringify(vods, null, 2)}
|
|
|
|
</code>
|
|
|
|
</pre>
|
|
|
|
{/* <VodsListHeading slug={vtuber.slug} displayName={vtuber.display_name}></VodsListHeading>
|
|
|
|
<VodsList vtuber={vtuber} vods={vods} page={1} pageSize={24} />
|
|
|
|
<Pager baseUrl={`/vt/${params.slug}/vods`} page={1} pageCount={vods.length/pageCount} /> */}
|
2024-01-20 16:16:14 +00:00
|
|
|
</>
|
|
|
|
)
|
|
|
|
}
|