import clsx from 'clsx' import { Spacer } from './layout/spacer' export function Pagination(props: { page: number itemsPerPage: number totalItems: number setPage: (page: number) => void scrollToTop?: boolean className?: string nextTitle?: string prevTitle?: string }) { const { page, itemsPerPage, totalItems, setPage, scrollToTop, nextTitle, prevTitle, className, } = props const maxPage = Math.ceil(totalItems / itemsPerPage) - 1 if (maxPage === 0) return return ( ) }