import { ChevronRightIcon } from "@/components/Icons" import styles from "./pagination.module.css" function PaginationButton({ children, isActive, handleClick, disabled, }: React.PropsWithChildren<{ disabled: boolean isActive?: boolean handleClick: () => void }>) { return ( ) } export default function Pagination({ pageCount, isFetching, handlePageChange, currentPage, }: { pageCount: number isFetching: boolean handlePageChange: (page: number) => void currentPage: number }) { const isOnFirstPage = currentPage === 1 const isOnLastPage = currentPage === pageCount return (
{ handlePageChange(currentPage - 1) }} > {[...Array(pageCount)].map((_, idx) => ( { handlePageChange(idx + 1) }} > {idx + 1} ))} { handlePageChange(currentPage + 1) }} >
) }