'use client' import React from 'react' import type { Tenant, Namespace } from '../_types' import { formatDate } from '../_api' interface Props { tenants: Tenant[] namespaces: Namespace[] selectedTenantId: string | null onSelectTenant: (id: string) => void onOpenCreate: () => void onLoadNamespaces: (tenantId: string) => void } export function NamespacesTab({ tenants, namespaces, selectedTenantId, onSelectTenant, onOpenCreate, onLoadNamespaces }: Props) { return (
{selectedTenantId && ( )}
{!selectedTenantId ? (
Bitte einen Mandanten waehlen
) : (
{namespaces.length === 0 ? ( ) : namespaces.map(ns => ( ))}
Name Slug Isolation Klassifikation Erstellt
Keine Namespaces
{ns.name} {ns.slug} {ns.isolation_level} {ns.classification} {formatDate(ns.created_at)}
)}
) }