import { API_BASE } from '@/lib/config';

export async function generateStaticParams() {
  try {
    const res = await fetch(`${API_BASE}/enterprise/organizations`);
    const data = await res.json();
    const items = data.items || [];
    if (items.length === 0) return [{ id: '1' }];
    return items.map((org: any) => ({ id: String(org.id) }));
  } catch {
    return [{ id: '1' }];
  }
}

import OrgDetailPage from './org-detail';

export default function Page() {
  return <OrgDetailPage />;
}
