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.

pluralize clicks

Steven Tey82d20ea06378
diff --git a/apps/web/app/partners.dub.co/(dashboard)/settings/payouts/payout-details-sheet.tsx b/apps/web/app/partners.dub.co/(dashboard)/settings/payouts/payout-details-sheet.tsx
index 7613d96f15..e697f36cbb 100644
--- a/apps/web/app/partners.dub.co/(dashboard)/settings/payouts/payout-details-sheet.tsx
+++ b/apps/web/app/partners.dub.co/(dashboard)/settings/payouts/payout-details-sheet.tsx
@@ -21,6 +21,7 @@ import {
fetcher,
formatDateTime,
OG_AVATAR_URL,
+ pluralize,
} from "@dub/utils";
import { formatPeriod } from "@dub/utils/src/functions/datetime";
import Link from "next/link";
@@ -122,7 +123,7 @@ function PayoutDetailsSheetContent({
<div className="flex flex-col">
<span className="text-sm text-neutral-700">
{row.original.type === "click"
- ? `${row.original.quantity} clicks`
+ ? `${row.original.quantity} ${pluralize("click", row.original.quantity)}`
: row.original.customer.email || row.original.customer.name}
</span>
<span className="text-xs text-neutral-500">
diff --git a/apps/web/ui/partners/payout-details-sheet.tsx b/apps/web/ui/partners/payout-details-sheet.tsx
index e7eff22f1a..3f9293ff5b 100644
--- a/apps/web/ui/partners/payout-details-sheet.tsx
+++ b/apps/web/ui/partners/payout-details-sheet.tsx
@@ -19,6 +19,7 @@ import {
fetcher,
formatDateTime,
OG_AVATAR_URL,
+ pluralize,
} from "@dub/utils";
import { formatPeriod } from "@dub/utils/src/functions/datetime";
import Link from "next/link";
@@ -135,7 +136,7 @@ function PayoutDetailsSheetContent({
<div className="flex flex-col">
<span className="text-sm text-neutral-700">
{row.original.type === "click"
- ? `${row.original.quantity} clicks`
+ ? `${row.original.quantity} ${pluralize("click", row.original.quantity)}`
: row.original.customer.email || row.original.customer.name}
</span>
<span className="text-xs text-neutral-500">