Skip to content

Commit

Permalink
Only show ledger pagination if there are items (#706)
Browse files Browse the repository at this point in the history
Remove pagination if there are no lines
  • Loading branch information
DeeTheDev authored Sep 17, 2024
1 parent 7a7c708 commit 5e23569
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions webapp/src/pages/LedgersOverview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,14 @@ export default function LedgersOverview() {
linesLoading={ledgersOverviewLoading || ledgerLinesLoading}
/>
<LayoutContainer gutters>
<ForwardBackPagination
page={page}
pageCount={ledgerLines.pageCount}
onPageChange={(pg) => setListQueryParams({ page: pg })}
scrollTop={140}
/>
{!isEmpty(activeLines) && (
<ForwardBackPagination
page={page}
pageCount={ledgerLines.pageCount}
onPageChange={(pg) => setListQueryParams({ page: pg })}
scrollTop={140}
/>
)}
</LayoutContainer>
</>
)}
Expand Down

0 comments on commit 5e23569

Please sign in to comment.