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.

Address CR feedback

Steven Tey61eb9bfc84d1
diff --git a/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/bounties/bounty-card.tsx b/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/bounties/bounty-card.tsx
index 47a7b9df88..db8b3f2e20 100644
--- a/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/bounties/bounty-card.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/bounties/bounty-card.tsx
@@ -40,9 +40,9 @@ export function PartnerBountyCard({
href={href ?? "#"}
onClick={onClick}
className={cn(
- "border-border-subtle bg-bg-default group relative flex w-full cursor-pointer flex-col overflow-hidden rounded-xl border text-left",
+ "border-border-subtle bg-bg-default group relative flex w-full flex-col overflow-hidden rounded-xl border text-left",
(href || onClick) &&
- "hover:border-border-default transition-all hover:shadow-lg",
+ "hover:border-border-default cursor-pointer transition-all hover:shadow-lg",
)}
>
<div className="p-3 pb-0">
diff --git a/apps/web/lib/bounty/api/bounty-availability.ts b/apps/web/lib/bounty/api/bounty-availability.ts
index fdc9c12056..9f4e726830 100644
--- a/apps/web/lib/bounty/api/bounty-availability.ts
+++ b/apps/web/lib/bounty/api/bounty-availability.ts
@@ -139,7 +139,7 @@ export function isPartnerEligibleForBounty({
if (bounty.startMode === BountyStartMode.relative) {
if (programEnrollment.createdAt < bounty.createdAt) {
console.log(
- `Partner enrolled before relative bounty ${bounty.id} was created.`,
+ `Partner enrolled before relative bounty ${bounty.id} was created and is not eligible for the bounty.`,
);
return false;
}
diff --git a/apps/web/lib/bounty/api/validate-bounty.ts b/apps/web/lib/bounty/api/validate-bounty.ts
index ff2315695e..982a715035 100644
--- a/apps/web/lib/bounty/api/validate-bounty.ts
+++ b/apps/web/lib/bounty/api/validate-bounty.ts
@@ -126,7 +126,8 @@ export function validateBounty({
if (submissionFrequency && !endsAt && !endsAfterDays) {
throw new DubApiError({
code: "bad_request",
- message: "`endsAt` is required when `submissionFrequency` is set.",
+ message:
+ "`endsAt` or `endsAfterDays` is required when `submissionFrequency` is set.",
});
}
}
diff --git a/apps/web/tests/bounties/index.test.ts b/apps/web/tests/bounties/index.test.ts
index c0213ae482..eb3191d361 100644
--- a/apps/web/tests/bounties/index.test.ts
+++ b/apps/web/tests/bounties/index.test.ts
@@ -387,7 +387,8 @@ describe.sequential(
expect(status).toEqual(400);
expect(data).toMatchObject({
error: {
- message: "`endsAt` is required when `submissionFrequency` is set.",
+ message:
+ "`endsAt` or `endsAfterDays` is required when `submissionFrequency` is set.",
},
});
});
@@ -538,7 +539,8 @@ describe.sequential(
expect(status).toEqual(400);
expect(data).toMatchObject({
error: {
- message: "`endsAt` is required when `submissionFrequency` is set.",
+ message:
+ "`endsAt` or `endsAfterDays` is required when `submissionFrequency` is set.",
},
});
});