import React, { useCallback } from "react"; import ReactPaginate from "react-paginate"; import { usePagination } from "react-use-pagination"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import styles from "./styles.module.css"; export default function Paginate({ totalPages, setPage, currentPage, }: ReturnType): JSX.Element { const onPageChange = useCallback( (selectedItem: { selected: number }) => { setPage(selectedItem.selected); }, [setPage] ); return ( ); }