diff --git a/src/components/Pagination/Pagination.jsx b/src/components/Pagination/Pagination.jsx index e69de29..e0a8d84 100644 --- a/src/components/Pagination/Pagination.jsx +++ b/src/components/Pagination/Pagination.jsx @@ -0,0 +1,26 @@ +import { Typography, Button } from '@mui/material'; + +import useStyles from './styles'; + +function Pagination({ currentPage, setPage, totalPages }) { + const classes = useStyles(); + + const handlePrev = () => { + if (currentPage !== 1) { setPage((prevPage) => prevPage - 1); } + }; + const handleNext = () => { + if (currentPage !== totalPages) { setPage((prevPage) => prevPage + 1); } + }; + + if (totalPages === 0) return null; + + return ( +
+ + {currentPage} + +
+ ); +} + +export default Pagination;