impl: dir content table virtualization

This commit is contained in:
2025-12-18 00:47:59 +00:00
parent 1024f36a9f
commit ba540918dc
10 changed files with 944 additions and 43 deletions

View File

@@ -115,10 +115,13 @@ export const directoryContentQueryAtom = atomFamily(
{ returns: DirectoryContentResponse },
).then(([_, result]) => result)
: Promise.reject(new Error("No account selected")),
getNextPageParam: (lastPage, _pages, lastPageParam) => ({
...lastPageParam,
cursor: lastPage.nextCursor ?? "",
}),
getNextPageParam: (lastPage, _pages, lastPageParam) =>
lastPage.nextCursor
? {
...lastPageParam,
cursor: lastPage.nextCursor,
}
: null,
})
}),
(paramsA, paramsB) =>