// frontend/app/inbox/page.tsx
import "@/styles/inbox.css";
import InboxView from "@/components/inbox/InboxView";
import { getInbox } from "@/lib/inbox/api";
import type { InboxItem } from "@/lib/types";

export const dynamic = "force-dynamic"; // 시드 데이터 항상 최신

export default async function InboxPage() {
  let items: InboxItem[] = [];
  let loadError = false;
  try {
    items = await getInbox();
  } catch {
    loadError = true;
  }
  return <InboxView initialItems={items} initialLoadError={loadError} />;
}
