mirror of https://github.com/embarklabs/embark.git
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:
parent
75af5c4ed9
commit
b751b9c559
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue