feat(secret-approval): added loading and empty states for request list

This commit is contained in:
Akhil Mohan
2023-10-05 20:34:50 +05:30
parent 04c7d49477
commit 4fd227c85f
2 changed files with 32 additions and 3 deletions
@@ -142,6 +142,8 @@ export const useGetSecretApprovalRequests = ({
}),
enabled: Boolean(workspaceId) && (options?.enabled ?? true),
getNextPageParam: (lastPage, pages) => {
if (lastPage.length && lastPage.length < limit) return undefined;
return lastPage?.length !== 0 ? pages.length * limit : undefined;
}
});