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 reward-settings.tsx

Kiran K6e6e18da65a1
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/settings/rewards/reward-settings.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/settings/rewards/reward-settings.tsx
index 51ad6fe008..2d0ab5bb0c 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/settings/rewards/reward-settings.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/programs/[programId]/settings/rewards/reward-settings.tsx
@@ -22,18 +22,21 @@ const events = {
text: "Click reward",
event: "click",
shortcut: "C",
+ eventName: "click",
},
lead: {
icon: UserPlus,
text: "Lead reward",
- event: "signup",
+ event: "lead",
shortcut: "L",
+ eventName: "signup",
},
sale: {
icon: MoneyBill,
text: "Sale reward",
event: "sale",
shortcut: "S",
+ eventName: "sale",
},
} as const;
@@ -171,7 +174,7 @@ const RewardDescription = ({ reward }: { reward: Reward }) => {
}
if (reward.maxDuration === 0) {
- return ""; // No recurring text for one-time rewards
+ return "";
}
return `, and again for every conversion of ${reward.maxDuration} months`;
@@ -180,7 +183,7 @@ const RewardDescription = ({ reward }: { reward: Reward }) => {
return (
<>
Earn <span className="text-blue-500">{amount}</span> for each{" "}
- {events[reward.event].text}
+ {events[reward.event].eventName}
{reward.event === "sale" && (
<span
className="text-neutral-900"