Commit 1412b5aa authored by tom's avatar tom

fix pagination on block page

parent 1b6eb9cc
......@@ -40,14 +40,17 @@ const BlockPageContent = () => {
{ id: 'txs', title: 'Transactions', component: <TxsContent query={ blockTxsQuery } showBlockInfo={ false } showSocketInfo={ false }/> },
];
const isPaginatorHidden = !blockTxsQuery.isLoading && !blockTxsQuery.isError && blockTxsQuery.pagination.page === 1 && !blockTxsQuery.pagination.hasNextPage;
const hasPagination = !isMobile && router.query.tab === 'txs' && !isPaginatorHidden;
return (
<Page>
<PageTitle text={ `Block #${ router.query.id }` }/>
<RoutedTabs
tabs={ tabs }
tabListProps={ isMobile ? undefined : TAB_LIST_PROPS }
rightSlot={ isMobile ? null : <Pagination { ...blockTxsQuery.pagination }/> }
stickyEnabled={ !isMobile }
rightSlot={ hasPagination ? <Pagination { ...blockTxsQuery.pagination }/> : null }
stickyEnabled={ hasPagination }
/>
</Page>
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment