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.

Make workflow programEnrollment optional and replace invalid font-regular classes.

Kiran K8ce9960140b5
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/confirm-create-bounty-modal.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/confirm-create-bounty-modal.tsx
index 4692f9f151..ac9fe46961 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/confirm-create-bounty-modal.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty/confirm-create-bounty-modal.tsx
@@ -136,7 +136,7 @@ function ConfirmCreateBountyModal({
</div>
)}
- <div className="text-content-subtle font-regular flex items-center gap-2 text-sm">
+ <div className="text-content-subtle flex items-center gap-2 text-sm font-normal">
<Users className="size-3.5" />
<span>{partnerAudienceLabel}</span>
</div>
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/bounty-card.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/bounty-card.tsx
index 8c81af4289..8eafdfaf2e 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/bounty-card.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/bounty-card.tsx
@@ -70,23 +70,23 @@ export function BountyCard({ bounty }: { bounty: BountyListProps }) {
{bounty.name}
</h3>
- <div className="text-content-subtle font-regular flex items-center gap-2 text-sm">
+ <div className="text-content-subtle flex items-center gap-2 text-sm font-normal">
<Calendar6 className="size-3.5" />
<span>{dateRangeLabel}</span>
</div>
<BountyRewardDescription
bounty={bounty}
- className="font-regular"
+ className="font-normal"
onTooltipClick={(e) => e.preventDefault()}
/>
- <div className="text-content-subtle font-regular flex items-center gap-2 text-sm">
+ <div className="text-content-subtle flex items-center gap-2 text-sm font-normal">
<Users className="size-3.5" />
<span>{partnerAudienceLabel}</span>
</div>
- <div className="text-content-subtle font-regular flex items-center gap-2 text-sm">
+ <div className="text-content-subtle flex items-center gap-2 text-sm font-normal">
<Users6 className="size-3.5" />
{bounty.groups.length === 0 ? (
<span>All groups</span>
@@ -103,7 +103,7 @@ export function BountyCard({ bounty }: { bounty: BountyListProps }) {
className="flex items-center gap-2"
>
<GroupColorCircle group={group} />
- <span className="font-regular text-sm text-neutral-700">
+ <span className="text-sm font-normal text-neutral-700">
{group.name}
</span>
</div>
diff --git a/apps/web/lib/api/workflows/execute-complete-bounty-workflow.ts b/apps/web/lib/api/workflows/execute-complete-bounty-workflow.ts
index 44b9e693c5..2ad63c771b 100644
--- a/apps/web/lib/api/workflows/execute-complete-bounty-workflow.ts
+++ b/apps/web/lib/api/workflows/execute-complete-bounty-workflow.ts
@@ -43,6 +43,12 @@ export const executeCompleteBountyWorkflow = async ({
const { bountyId } = action.data;
const { identity, metrics, programEnrollment } = context;
const { customerId, customerFirstSaleAt } = identity;
+
+ if (!programEnrollment) {
+ console.error("Program enrollment not set in the context.");
+ return;
+ }
+
const { partnerId, groupId } = programEnrollment;
if (!groupId) {
diff --git a/apps/web/lib/types.ts b/apps/web/lib/types.ts
index 2d0d225e98..42d1adaf64 100644
--- a/apps/web/lib/types.ts
+++ b/apps/web/lib/types.ts
@@ -865,7 +865,7 @@ export interface WorkflowContext {
current?: PartnerMetrics;
aggregated?: PartnerMetrics;
};
- programEnrollment: Pick<
+ programEnrollment?: Pick<
ProgramEnrollment,
| "groupId"
| "createdAt"