mirror of
https://github.com/aljazceru/claude-code-viewer.git
synced 2025-12-20 23:04:19 +01:00
perf: added pagination for session in order to improve large project's performance issue
This commit is contained in:
@@ -16,12 +16,15 @@ export const projectListQuery = {
|
||||
},
|
||||
} as const;
|
||||
|
||||
export const projectDetailQuery = (projectId: string) =>
|
||||
export const projectDetailQuery = (projectId: string, cursor?: string) =>
|
||||
({
|
||||
queryKey: ["projects", projectId],
|
||||
queryKey: cursor
|
||||
? ["projects", projectId, cursor]
|
||||
: ["projects", projectId],
|
||||
queryFn: async () => {
|
||||
const response = await honoClient.api.projects[":projectId"].$get({
|
||||
param: { projectId },
|
||||
query: { cursor },
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
|
||||
Reference in New Issue
Block a user