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.

Update page-client.tsx

Tim Wilsonb2c9ad446812
diff --git a/apps/web/app/partners.dub.co/(dashboard)/[partnerId]/[programId]/page-client.tsx b/apps/web/app/partners.dub.co/(dashboard)/[partnerId]/[programId]/page-client.tsx
index a83653540c..e1f69cd7ee 100644
--- a/apps/web/app/partners.dub.co/(dashboard)/[partnerId]/[programId]/page-client.tsx
+++ b/apps/web/app/partners.dub.co/(dashboard)/[partnerId]/[programId]/page-client.tsx
@@ -159,7 +159,10 @@ function EarningsChart() {
<div className="mt-1">
{total !== undefined ? (
<span className="text-2xl text-neutral-800">
- {currencyFormatter(total / 100)}
+ {currencyFormatter(total, {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ })}
</span>
) : (
<div className="h-9 w-24 animate-pulse rounded-md bg-neutral-200" />
@@ -246,7 +249,10 @@ function EarningsChart() {
<p className="capitalize text-gray-600">Earnings</p>
</div>
<p className="text-right font-medium text-gray-900">
- {currencyFormatter(d.values.earnings)}
+ {currencyFormatter(d.values.earnings, {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ })}
</p>
</div>
</>
@@ -399,7 +405,7 @@ function SalesTable() {
header: "Earned",
accessorKey: "earnings",
cell: ({ row }) => {
- return currencyFormatter(row.original.earnings / 100, {
+ return currencyFormatter(row.original.earnings, {
minimumFractionDigits: 2,
maximumFractionDigits: 2,
});