Skip to content

Commit

Permalink
fix(components): fix totalLength redundant total
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Sep 19, 2023
1 parent a1256e4 commit 9988e72
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,11 @@ export function Pagination(props: PaginationProps) {
<strong>
{pageIndex + 1} of {pageOptions.length}
</strong>
{totalLength !== undefined && (
<span className='ml-3'>
{i18n("Totals")}: <strong>{new Intl.NumberFormat(undefined).format(totalLength)}</strong> {i18n("items")}
</span>
)}
</li>
)}
{totalLength !== undefined && (
<li className={"mb-3 flex items-center"} data-testid='pagination-total-items'>
{i18n("Totals")}: <strong>{new Intl.NumberFormat(undefined).format(totalLength)}</strong> {i18n("items")}
{i18n("Total")}: <strong>{new Intl.NumberFormat(undefined).format(totalLength)}</strong> {i18n("items")}
</li>
)}
</nav>
Expand Down

0 comments on commit 9988e72

Please sign in to comment.