diff --git a/src/app/milestones/page.tsx b/src/app/milestones/page.tsx index 16cf0af..680b352 100644 --- a/src/app/milestones/page.tsx +++ b/src/app/milestones/page.tsx @@ -1,6 +1,8 @@ +import { Layers } from "lucide-react"; import { fetchMilestones, fetchMaintenancePools } from "@/lib/api"; import { mockMilestones, mockMaintenancePools } from "@/lib/mock-data"; import { formatCurrency, formatPercent } from "@/lib/utils"; +import { EmptyState } from "@/components/ui/EmptyState"; import { MilestoneFundButton, PoolDepositButton } from "./MilestoneActions"; export const metadata = { @@ -25,37 +27,47 @@ export default async function MilestonesPage() { each one resolves.

-
- {milestones.map((m) => { - const pct = m.distributed / m.budget; - return ( -
-

{m.repo}

-

{m.name}

-
-
+ {milestones.length > 0 ? ( +
+ {milestones.map((m) => { + const pct = m.distributed / m.budget; + return ( +
+

{m.repo}

+

{m.name}

+
+
+
+
+ + {formatCurrency(m.distributed, m.asset)} of{" "} + {formatCurrency(m.budget, m.asset)} + + {formatPercent(pct)} +
+

+ {m.completedCount} of {m.issueCount} issues complete +

+
-
- - {formatCurrency(m.distributed, m.asset)} of{" "} - {formatCurrency(m.budget, m.asset)} - - {formatPercent(pct)} -
-

- {m.completedCount} of {m.issueCount} issues complete -

- -
- ); - })} -
+ ); + })} +
+ ) : ( +
+ +
+ )}

Recurring maintenance pools @@ -64,23 +76,33 @@ export default async function MilestonesPage() { Sponsors deposit monthly so maintainers can reward ongoing upkeep, like dependency bumps, docs, and cleanup, that would otherwise go unfunded.

-
- {pools.map((pool) => ( -
-

{pool.repo}

-

- {formatCurrency(pool.balance, pool.asset)} balance -

-

- {formatCurrency(pool.monthlyDeposit, pool.asset)} deposited monthly -

- -
- ))} -
+ {pools.length > 0 ? ( +
+ {pools.map((pool) => ( +
+

{pool.repo}

+

+ {formatCurrency(pool.balance, pool.asset)} balance +

+

+ {formatCurrency(pool.monthlyDeposit, pool.asset)} deposited monthly +

+ +
+ ))} +
+ ) : ( +
+ +
+ )}

); }