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

export async function generateStaticParams() {
  try {
    const res = await fetch(`${API_BASE}/users`, {
      headers: { 'Content-Type': 'application/json' },
    });
    const data = await res.json();
    const users = data.items || [];
    if (users.length === 0) return [{ id: '1' }];
    return users.map((u: any) => ({ id: String(u.id) }));
  } catch {
    return [{ id: '1' }];
  }
}

import UserProfilePage from './user-profile';

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