import { serverFetch } from "@/lib/api";
import { CrowdfundingLive } from "@/components/PublicPages";

type Campaign = {
  id: number; title: string; slug?: string; category: string;
  short_description: string; raised_amount: number; goal_amount: number;
};

export default async function CrowdfundingPage() {
  const campaigns = await serverFetch<Campaign[]>("/crowdfunding", 60);
  return <CrowdfundingLive serverData={campaigns || []} />;
}
