fix(site): do not return next page if the current size is lower than the limit (#10287)

This commit is contained in:
Bruno Quaresma
2023-10-16 13:39:48 +00:00
committed by GitHub
parent 3c49290dd7
commit 8efa1239e7
+3
View File
@@ -23,6 +23,9 @@ export const infiniteWorkspaceBuilds = (
return {
queryKey: ["workspaceBuilds", workspaceId, req],
getNextPageParam: (lastPage, pages) => {
if (lastPage.length < limit) {
return undefined;
}
return pages.length + 1;
},
queryFn: ({ pageParam = 0 }) => {