mirror of https://github.com/embarklabs/embark.git
fix(embark-ui): pagination
This commit is contained in:
parent
24a6a4701f
commit
f5f610d520
|
@ -13,9 +13,6 @@ const Pagination = ({currentPage, numberOfPages, changePage}) => {
|
||||||
if (i < 1) {
|
if (i < 1) {
|
||||||
i = 1;
|
i = 1;
|
||||||
}
|
}
|
||||||
if (max - i < NB_PAGES_MAX) {
|
|
||||||
max += NB_PAGES_MAX - max + 1;
|
|
||||||
}
|
|
||||||
const pageNumbers = [];
|
const pageNumbers = [];
|
||||||
for (i; i <= max; i++) {
|
for (i; i <= max; i++) {
|
||||||
pageNumbers.push(i);
|
pageNumbers.push(i);
|
||||||
|
|
|
@ -47,7 +47,7 @@ const Transactions = ({transactions, contracts, changePage, currentPage, numberO
|
||||||
</Row>
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
<Pagination changePage={changePage} currentPage={currentPage} numberOfPages={numberOfPages}/>
|
{numberOfPages && <Pagination changePage={changePage} currentPage={currentPage} numberOfPages={numberOfPages}/>}
|
||||||
</CardBody>
|
</CardBody>
|
||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
Loading…
Reference in New Issue