diff --git a/src/components/Pagination/PaginationRowBack.js b/src/components/Pagination/PaginationRowBack.js index cc30bdb935b..115eeba882c 100644 --- a/src/components/Pagination/PaginationRowBack.js +++ b/src/components/Pagination/PaginationRowBack.js @@ -25,7 +25,9 @@ const PaginationRowBack = ({ title={messagesFirstPage} onClick={e => { e.preventDefault(); - onFirstPage(e); + if (page !== 1) { + onFirstPage(e); + } }} > @@ -37,7 +39,9 @@ const PaginationRowBack = ({ title={messagesPreviousPage} onClick={e => { e.preventDefault(); - onPreviousPage(e); + if (page !== 1) { + onPreviousPage(e); + } }} > diff --git a/src/components/Pagination/PaginationRowForward.js b/src/components/Pagination/PaginationRowForward.js index 67261ee2625..8f4f23e0202 100644 --- a/src/components/Pagination/PaginationRowForward.js +++ b/src/components/Pagination/PaginationRowForward.js @@ -26,7 +26,9 @@ const PaginationRowForward = ({ title={messagesNextPage} onClick={e => { e.preventDefault(); - onNextPage(e); + if (page !== amountOfPages) { + onNextPage(e); + } }} > @@ -38,7 +40,9 @@ const PaginationRowForward = ({ title={messagesLastPage} onClick={e => { e.preventDefault(); - onLastPage(e); + if (page !== amountOfPages) { + onLastPage(e); + } }} >