Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

rename scripts

Steven Tey6a377d285fd3
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/partners/partner-table.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/partners/partner-table.tsx
index 65dc2d5ff8..38413ca078 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/partners/partner-table.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/partners/partner-table.tsx
@@ -25,6 +25,7 @@ import {
fetcher,
formatDate,
} from "@dub/utils";
+import { nFormatter } from "@dub/utils/src/functions";
import { useMemo } from "react";
import useSWR from "swr";
import { usePartnerFilters } from "./use-partner-filters";
@@ -143,13 +144,16 @@ export function PartnerTable({ programId }: { programId: string }) {
},
{
header: "Conversions",
- accessorFn: (d) => (d.status !== "pending" ? d.link?.sales : "-"),
+ accessorFn: (d) =>
+ d.status !== "pending"
+ ? nFormatter(d.link?.sales, { full: true })
+ : "-",
},
{
header: "Earned",
accessorFn: (d) =>
d.status !== "pending"
- ? currencyFormatter(d.earnings, {
+ ? currencyFormatter(d.earnings / 100, {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
})
diff --git a/apps/web/scripts/partner.ts b/apps/web/scripts/create-payouts.ts
similarity index 100%
rename from apps/web/scripts/partner.ts
rename to apps/web/scripts/create-payouts.ts
diff --git a/apps/web/scripts/program.ts b/apps/web/scripts/create-program.ts
similarity index 100%
rename from apps/web/scripts/program.ts
rename to apps/web/scripts/create-program.ts