diff --git a/src/components/Paginate.jsx b/src/components/Paginate.jsx index b49a4ec..456766b 100644 --- a/src/components/Paginate.jsx +++ b/src/components/Paginate.jsx @@ -85,8 +85,6 @@ export default class Paginate extends Component { * {...x} => represents page neighbours */ fetchPageNumbers() { - this.loadProps(); - const totalPages = this.totalPages; const currentPage = this.state.currentPage; const pageNeighbours = this.pageNeighbours; @@ -135,6 +133,8 @@ export default class Paginate extends Component { } render() { + this.loadProps(); + if (!this.totalRecords || this.totalPages === 1) return null; const currentPage = this.state.currentPage;