fp/services/next/app/latest-vods/page.tsx

25 lines
681 B
TypeScript

import VodsList from '@/app/components/vods-list';
import { IVodsResponse } from '@/app/lib/vods';
import Pager from '@/app/components/pager';
import { getVods } from '@/app/lib/vods';
interface IPageParams {
params: {
slug: string;
}
}
export default async function Page({ params }: IPageParams) {
const pageSize = 24
const vods = await getVods(1, pageSize);
return (
<>
<h2 className='title is-2'>Latest VODs</h2>
<p className='subtitle'>page 1</p>
<VodsList vods={vods} page={1} pageSize={24} />
<Pager baseUrl='/latest-vods' page={1} pageCount={vods.length/pageSize} />
</>
)
}