import { getGoals } from "@/app/lib/pm"; import { getCampaign } from "@/app/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 ( <>Shooting for the stars
In Progress
Planned
Completed