refactor: implement project package segment lazy select

This commit is contained in:
2026-06-18 16:30:06 +05:30
parent 6cf363dce1
commit 9e76b8e6d0
31 changed files with 513 additions and 1076 deletions

View File

@@ -44,15 +44,6 @@ export function useAllPackageOptionsQuery() {
});
}
export function usePackagesByProjectQuery(projectId: string, enabled: boolean) {
return useQuery({
queryKey: ['packages', 'by-project', projectId],
queryFn: () =>
packageService.getPackagesByProject(projectId, { skip: 0, limit: 1000 }),
enabled: enabled && Boolean(projectId),
});
}
export function useDeleteSegmentMutation() {
const queryClient = useQueryClient();