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.

handle $NaN

Kiran Kf2d666884452
diff --git a/apps/web/ui/partners/create-payout-sheet.tsx b/apps/web/ui/partners/create-payout-sheet.tsx
index 017bc22182..190e353c2f 100644
--- a/apps/web/ui/partners/create-payout-sheet.tsx
+++ b/apps/web/ui/partners/create-payout-sheet.tsx
@@ -167,6 +167,8 @@ function CreatePayoutSheetContent({ setIsOpen }: CreatePayoutSheetProps) {
payoutAmount = quantity && amount ? quantity * amount : undefined;
}
+ const amountAsNumber = amount ? Number(amount) : undefined;
+
return {
...(selectedPartner && {
Partner: (
@@ -203,13 +205,12 @@ function CreatePayoutSheetContent({ setIsOpen }: CreatePayoutSheetProps) {
full: true,
})
),
- [`Reward per ${payoutType.replace(/s$/, "")}`]: currencyFormatter(
- amount,
- {
- minimumFractionDigits: 2,
- maximumFractionDigits: 2,
- },
- ),
+ [`Reward per ${payoutType.replace(/s$/, "")}`]: amountAsNumber
+ ? currencyFormatter(amountAsNumber, {
+ minimumFractionDigits: 2,
+ maximumFractionDigits: 2,
+ })
+ : "-",
}),
...(payoutAmount && {