import React from "react"; import { Pagination, IconButton, ButtonGroup } from "@chakra-ui/react"; import { LuChevronLeft, LuChevronRight } from "react-icons/lu"; type PaginationProps = { page: number; setPage: (page: number) => void; total: number; size: number; }; export default function PaginationComponent(props: PaginationProps) { const { page, setPage, total, size } = props; const totalPages = Math.ceil(total / size); if (totalPages <= 1) return null; return ( setPage(details.page)} style={{ display: "flex", justifyContent: "center" }} > ( {page.value} )} /> ); }