MCPcopy Create free account
hub / github.com/agent-tower/core / useProjects

Function useProjects

packages/web/src/hooks/use-projects.ts:74–85  ·  view source on GitHub ↗
(options?: ListProjectsParams)

Source from the content-addressed store, hash-verified

72 * GET /api/projects
73 */
74export function useProjects(options?: ListProjectsParams) {
75 const params: Record<string, string> = {}
76 if (options?.page != null) params.page = String(options.page)
77 if (options?.limit != null) params.limit = String(options.limit)
78 if (options?.includeArchived) params.includeArchived = 'true'
79
80 return useQuery({
81 queryKey: queryKeys.projects.list(options as Record<string, unknown> | undefined),
82 queryFn: () =>
83 apiClient.get<PaginatedResponse<Project>>('/projects', { params }),
84 })
85}
86
87/**
88 * 获取项目详情(含任务统计)

Callers 2

ProjectSettingsPageFunction · 0.90
ProjectKanbanPageFunction · 0.90

Calls 2

listMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected