mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
fix(site): do not return next page if the current size is lower than the limit (#10287)
This commit is contained in:
@@ -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 }) => {
|
||||
|
||||
Reference in New Issue
Block a user