diff --git a/src/components/OrchDelegatorViewer.js b/src/components/OrchDelegatorViewer.js index 82a5ad9..97c7ecc 100644 --- a/src/components/OrchDelegatorViewer.js +++ b/src/components/OrchDelegatorViewer.js @@ -34,6 +34,7 @@ const OrchDelegatorViewer = (obj) => { } const totalPages = (delegators.length + (itemsPerPage - (delegators.length % itemsPerPage))) / itemsPerPage; + const thisPage = (activePage > totalPages) ? totalPages : activePage; return (
@@ -45,7 +46,7 @@ const OrchDelegatorViewer = (obj) => {
{ sortedList.map((delObj, idx) => { - const tmp = idx - ((activePage - 1) * itemsPerPage); + const tmp = idx - ((thisPage - 1) * itemsPerPage); if (tmp >= 0 && tmp < itemsPerPage) { return (
@@ -71,7 +72,7 @@ const OrchDelegatorViewer = (obj) => {
{totalPages > 1 ? - + : null}