import React from "react"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Badge } from "@/components/ui"; import type { NamespaceResourceInfo } from "@/lib/tauriCommands"; interface NamespaceListProps { items: NamespaceResourceInfo[]; clusterId: string; namespace?: string; } function statusVariant(status: string): "success" | "destructive" | "secondary" { if (status === "Active") return "success"; if (status === "Terminating") return "destructive"; return "secondary"; } export function NamespaceList({ items }: NamespaceListProps) { return (
Name Status Age {items.length === 0 ? ( No namespaces found ) : ( items.map((ns) => ( {ns.name} {ns.status} {ns.age} )) )}
); }