Skip to content

Commit

Permalink
Conditionaly renders pagination component if number of entries is mor…
Browse files Browse the repository at this point in the history
…e than results per page (ohcnetwork#9004)
  • Loading branch information
mnshrm authored Nov 12, 2024
1 parent fe82a57 commit 6ab35f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Common/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const Pagination = ({
};

const totalCount = data.totalCount;
if (!totalCount) {
if (!totalCount || totalCount <= rowsPerPage) {
return null;
}
const totalPage = Math.ceil(totalCount / rowsPerPage);
Expand Down

0 comments on commit 6ab35f1

Please sign in to comment.