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 BountyLogic

Steven Tey8d2fc93a120e
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty-sheet.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty-sheet.tsx
index c9eef22c60..fe6095afcc 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty-sheet.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/add-edit-bounty-sheet.tsx
@@ -129,9 +129,7 @@ function BountySheetContent({ setIsOpen, bounty }: BountySheetProps) {
: {
operator: "gte",
},
- ...(bounty && {
- performanceScope: bounty.performanceScope,
- }),
+ performanceScope: bounty?.performanceScope ?? "new",
},
});
diff --git a/apps/web/scripts/migrations/backfill-bounties.ts b/apps/web/scripts/migrations/backfill-performance-bounty-submissions.ts
similarity index 100%
rename from apps/web/scripts/migrations/backfill-bounties.ts
rename to apps/web/scripts/migrations/backfill-performance-bounty-submissions.ts
diff --git a/apps/web/ui/partners/bounties/bounty-logic.tsx b/apps/web/ui/partners/bounties/bounty-logic.tsx
index 6a330de2d4..7ab8fdd45c 100644
--- a/apps/web/ui/partners/bounties/bounty-logic.tsx
+++ b/apps/web/ui/partners/bounties/bounty-logic.tsx
@@ -34,22 +34,13 @@ export function BountyLogic({ className }: { className?: string }) {
<Trophy className="size-4 text-neutral-800" />
</div>
<span className="text-content-emphasis text-sm font-medium leading-relaxed">
- When partner{" "}
+ When partner's{" "}
<div className="inline-flex items-center gap-1">
<Controller
control={control}
name="performanceScope"
render={({ field }) => (
- <InlineBadgePopover
- text={
- field.value === "new"
- ? "new"
- : field.value === "lifetime"
- ? "lifetime"
- : "type"
- }
- invalid={!field.value}
- >
+ <InlineBadgePopover text={field.value} invalid={!field.value}>
<InlineBadgePopoverMenu
selectedValue={field.value}
onSelect={field.onChange}