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

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

import EditContentPage from './edit-content';

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