import { getGoals } from "@/lib/pm"; import { getCampaign } from "@/lib/patreon"; interface IFundingStatusBadgeProps { completedPercentage: number; } function FundingStatusBadge({ completedPercentage }: IFundingStatusBadgeProps) { if (completedPercentage === 100) return Funded; return ( {completedPercentage}% Funded ); } // export interface IGoals { // complete: IIssue[]; // inProgress: IIssue[]; // planned: IIssue[]; // featuredFunded: IIssue; // featuredUnfunded: IIssue; // } export default async function Page() { const { pledgeSum } = await getCampaign() const goals = await getGoals(pledgeSum); if (!goals) return
failed to get goals
const { inProgress, planned, complete } = goals; return ( <>In Progress
Planned
Completed