refactor(app): rename Component* UI widgets to accurate domain names
The dashboard widgets were named after the old 'component' concept. Renamed each to what it actually renders: - ComponentCard → ServiceCard (ServiceSummary, /services/, service actions) - ComponentTable → ProgramTable (ProgramSummary[], the program catalog) - ComponentEditor→ DeploymentEditor (DeploymentDetail, the unified type) - ComponentFields→ DeploymentFields (AnyDetail) - AddComponent → AddDeployment Also purged the domain term 'component' from the rest of the app: the useComponent hook → useDeployment, ConfigPanel + the three detail pages' `component` prop/var → `deployment`, and the gateway/node table headers (Component → Program / Deployment). Props renamed to match (component → service / program / deployment). The React UI directory app/src/components/ keeps its conventional name. App type-checks and builds clean.
This commit is contained in:
@@ -18,8 +18,8 @@ import type {
|
||||
NodeDetail,
|
||||
} from "@/types"
|
||||
|
||||
// Legacy compat hook — used by ConfigEditorPage and ProgramRedirect
|
||||
export function useComponent(name: string) {
|
||||
// Compat hook for the /deployments/{name} unified detail endpoint
|
||||
export function useDeployment(name: string) {
|
||||
return useQuery({
|
||||
queryKey: ["deployments", name],
|
||||
queryFn: () => apiClient.get<DeploymentDetail>(`/deployments/${name}`),
|
||||
|
||||
Reference in New Issue
Block a user