Skip to content

Commit

Permalink
Do not show pagination when no data present in ProjectCardPaginator
Browse files Browse the repository at this point in the history
  • Loading branch information
royallsilwallz committed Oct 31, 2023
1 parent f27b463 commit 7da7a50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/projects/projectCardPaginator.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ export const ProjectCardPaginator = ({ status, pagination, fullProjectsQuery, se
);
};

if (!apiIsFetched) {
// do not show pagination when the data is being fetched or it has zero results
if (!apiIsFetched || !pagination?.total) {
return null;
}
const activePage = (apiIsFetched && pagination?.page) || 1;
Expand Down

0 comments on commit 7da7a50

Please sign in to comment.