2024-07-10 22:11:18 +00:00
|
|
|
import VodsList from '@/app/components/vods-list';
|
|
|
|
import { getVods } from '@/app/lib/vods';
|
|
|
|
import Pager from '@/app/components/pager';
|
2024-01-20 16:16:14 +00:00
|
|
|
|
|
|
|
interface IPageParams {
|
|
|
|
params: {
|
|
|
|
page: number;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export default async function Page({ params: { page } }: IPageParams) {
|
2024-12-16 20:39:23 +00:00
|
|
|
|
|
|
|
const pageSize = 24
|
|
|
|
const { count, vods } = await getVods(page, pageSize, true);
|
|
|
|
|
2024-01-20 16:16:14 +00:00
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<h2 className='title is-2'>Latest VODs</h2>
|
|
|
|
<p className='subtitle'>page {page}</p>
|
2024-12-16 20:39:23 +00:00
|
|
|
<VodsList vods={vods} page={page} pageSize={pageSize} />
|
2024-01-20 16:16:14 +00:00
|
|
|
<Pager
|
|
|
|
baseUrl='/latest-vods'
|
|
|
|
page={page}
|
2024-12-16 20:39:23 +00:00
|
|
|
pageCount={Math.floor(count/pageSize)}
|
2024-01-20 16:16:14 +00:00
|
|
|
/>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|