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.

improve program description

Steven Tey10a7e123395f
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 e9bb9de22a..df89ea0d1a 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
@@ -74,7 +74,7 @@ export default function ProgramPageClient() {
{program ? (
<ProgramCommissionDescription program={program} />
) : (
- <div className="h-7 w-full animate-pulse rounded-md bg-neutral-200" />
+ <div className="h-7 w-5/6 animate-pulse rounded-md bg-neutral-200" />
)}
</div>
<span className="mb-1.5 mt-6 block text-sm text-neutral-800">
diff --git a/apps/web/ui/partners/program-commission-description.tsx b/apps/web/ui/partners/program-commission-description.tsx
index c26d20a83a..70d8330000 100644
--- a/apps/web/ui/partners/program-commission-description.tsx
+++ b/apps/web/ui/partners/program-commission-description.tsx
@@ -30,18 +30,21 @@ export function ProgramCommissionDescription({
})}{" "}
</strong>
for each sale
- {program.recurringCommission &&
- ((program.recurringDuration && program.recurringDuration > 0) ||
- program.isLifetimeRecurring) ? (
+ {program.isLifetimeRecurring ? (
+ <strong className={cn("font-semibold", periodClassName)}>
+ {" "}
+ for the customer's lifetime.
+ </strong>
+ ) : program.recurringCommission &&
+ program.recurringDuration &&
+ program.recurringDuration > 0 ? (
<>
, and again{" "}
<strong className={cn("font-semibold", periodClassName)}>
every {program.recurringInterval || "cycle"} for{" "}
- {program.isLifetimeRecurring
- ? "the customer's lifetime."
- : program.recurringDuration
- ? `${program.recurringDuration} ${pluralize(program.recurringInterval || "cycle", program.recurringDuration)}.`
- : null}
+ {program.recurringDuration
+ ? `${program.recurringDuration} ${pluralize(program.recurringInterval || "cycle", program.recurringDuration)}.`
+ : null}
</strong>
</>
) : (