Skip to content

Commit

Permalink
fix: ecocredit table with ghost credits on first page
Browse files Browse the repository at this point in the history
  • Loading branch information
flagrede committed Oct 10, 2023
1 parent 8799232 commit 7565d64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web-marketplace/src/components/organisms/EcocreditsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ export const EcocreditsTable: React.FC<
initialPaginationParams,
isIgnoreOffset = false,
}) => {
if (!credits?.length) {
const hasMorePages =
(initialPaginationParams?.count ?? 0) >
(initialPaginationParams?.rowsPerPage ?? 0);
if (!credits || (!credits?.length && !hasMorePages)) {
return (
<NoCredits
title="No ecocredits to display"
Expand Down

0 comments on commit 7565d64

Please sign in to comment.