diff --git a/src/app/gigs/[id]/page.tsx b/src/app/gigs/[id]/page.tsx index 11b86062..bdd42538 100644 --- a/src/app/gigs/[id]/page.tsx +++ b/src/app/gigs/[id]/page.tsx @@ -283,7 +283,7 @@ export default async function GigPage({ params }: GigPageProps) { const coinNote = coin ? ` (paid in ${coin})` : ""; const fmt = (val: number) => { - if (isSats) return `${val.toLocaleString()} sats`; + if (isSats) return `${val.toLocaleString("en-US")} sats`; return `${formatCurrency(val)} USD`; }; diff --git a/src/components/gigs/GigCard.tsx b/src/components/gigs/GigCard.tsx index 54078ef9..f1d179a8 100644 --- a/src/components/gigs/GigCard.tsx +++ b/src/components/gigs/GigCard.tsx @@ -63,7 +63,7 @@ export function GigCard({ const coinNote = coin ? ` (paid in ${coin})` : ""; const fmt = (val: number) => { - if (isSats) return `${val.toLocaleString()} sats`; + if (isSats) return `${val.toLocaleString("en-US")} sats`; return `${formatCurrency(val)} USD`; }; diff --git a/src/components/gigs/GigCardSats.test.tsx b/src/components/gigs/GigCardSats.test.tsx index f9f2df0c..c52889aa 100644 --- a/src/components/gigs/GigCardSats.test.tsx +++ b/src/components/gigs/GigCardSats.test.tsx @@ -33,8 +33,8 @@ function getBudgetDisplay(gig: { const coinNote = coin ? ` (paid in ${coin})` : ""; const fmt = (val: number) => { - if (isSats) return `${val.toLocaleString()} sats`; - return `$${val.toLocaleString()} USD`; + if (isSats) return `${val.toLocaleString("en-US")} sats`; + return `$${val.toLocaleString("en-US")} USD`; }; if (gig.budget_type === "revenue_share") { diff --git a/src/types/index.ts b/src/types/index.ts index fc0172b7..e5fb44eb 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -340,10 +340,10 @@ export function formatBudgetAmount(amount: number, paymentCoin?: string | null): if (paymentCoin === "BTC" && amount < 1) { return `₿${amount}`; } - return `${amount.toLocaleString()} sats`; + return `${amount.toLocaleString("en-US")} sats`; } // Default: USD - return `$${amount.toLocaleString(undefined, { minimumFractionDigits: 0, maximumFractionDigits: 2 })}`; + return `$${amount.toLocaleString("en-US", { minimumFractionDigits: 0, maximumFractionDigits: 2 })}`; } /** Get the currency label for display */