refactor(@cockpit/explorer): show pagination when num pages > 1

During work on PRs #1492 and #1494 it became evident that it's not desirable to
show pagination controls unless the number of pages is greater than one.
This commit is contained in:
Michael Bradley, Jr 2019-04-02 14:54:09 -05:00 committed by Iuri Matias
parent 75af5c4ed9
commit b751b9c559
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ const Blocks = ({blocks, changePage, currentPage, numberOfPages}) => (
</Row> </Row>
</div> </div>
))} ))}
{numberOfPages > 0 && <Pagination changePage={changePage} currentPage={currentPage} numberOfPages={numberOfPages}/>} {numberOfPages > 1 && <Pagination changePage={changePage} currentPage={currentPage} numberOfPages={numberOfPages}/>}
</CardBody> </CardBody>
</Card> </Card>
</Col> </Col>

View File

@ -60,7 +60,7 @@ const Transactions = ({transactions, contracts, changePage, currentPage, numberO
</Row> </Row>
</div> </div>
))} ))}
{numberOfPages > 0 && <Pagination changePage={changePage} currentPage={currentPage} numberOfPages={numberOfPages}/>} {numberOfPages > 1 && <Pagination changePage={changePage} currentPage={currentPage} numberOfPages={numberOfPages}/>}
</CardBody> </CardBody>
</Card> </Card>
</Col> </Col>