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 ProgramRewardList discount to match ProgramRewardDescription

Steven Tey2bd34aa1c00a
diff --git a/apps/web/ui/partners/program-reward-list.tsx b/apps/web/ui/partners/program-reward-list.tsx
index dac800c14b..e584a7d8e7 100644
--- a/apps/web/ui/partners/program-reward-list.tsx
+++ b/apps/web/ui/partners/program-reward-list.tsx
@@ -71,13 +71,15 @@ export function ProgramRewardList({
<>
{" "}
New users get {constructRewardAmount(discount)} off{" "}
- {discount.maxDuration === null ? (
- <> for their lifetime</>
- ) : discount.maxDuration && discount.maxDuration > 1 ? (
- <>for {discount.maxDuration} months</>
- ) : (
- <>for their first month</>
- )}
+ {discount.maxDuration === null
+ ? "for their lifetime"
+ : discount.maxDuration === 0
+ ? "for their first purchase"
+ : discount.maxDuration === 1
+ ? "for their first month"
+ : discount.maxDuration && discount.maxDuration > 1
+ ? `for ${discount.maxDuration} months`
+ : null}
</>
)}
</Item>