diff --git a/pairent_frontend_react/src/components/UI/Pagination/index.jsx b/pairent_frontend_react/src/components/UI/Pagination/index.jsx index c703c06..7223825 100644 --- a/pairent_frontend_react/src/components/UI/Pagination/index.jsx +++ b/pairent_frontend_react/src/components/UI/Pagination/index.jsx @@ -1,9 +1,11 @@ import React from 'react'; import {getPagesArray, getPreviousAndNextPage} from "../../../utils/Pages"; -const Pagination = ({totalPages, page, changePage, viewAll}) => { +const Pagination = ({totalPages, page, changePage, onChange, viewAll, showAll}) => { let pagesArray = getPagesArray(totalPages); let [previousPage, nextPage] = getPreviousAndNextPage(totalPages, page); + + changePage = onChange ?? changePage; const getPagesShow = () => { let pagesShow = []; @@ -15,7 +17,10 @@ const Pagination = ({totalPages, page, changePage, viewAll}) => { return (
- + { + showAll ? + : null + }