'use client'; import { IamSectionCard } from '@/components/iam/IamSectionCard'; import { useApi } from '@/lib/hooks/use-api'; import { iamTenant } from '@/lib/api/iam'; import type { IamTenant } from '@/lib/api/types/tenant'; export default function IamTenantPage() { const { data, loading, error } = useApi(() => iamTenant.list({ page: '1', page_size: '100' })); const rows = data?.items ?? []; return ( {loading ?

加载中…

: null} {error ?

{error}

: null} {!loading && !error ? (
{rows.map((r) => ( ))}
租户名称 编码 状态 ID
{r.tenant_name ?? '—'} {r.tenant_code ?? '—'} {r.status ?? '—'} {r.id}
{!rows.length ?

暂无租户

: null}
) : null}
); }