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.

Hero landerData

Tim Wilson5230cc43dc67
diff --git a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/page.tsx b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/page.tsx
index fd3829d65b..a7a6d1a524 100644
--- a/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/page.tsx
+++ b/apps/web/app/(ee)/partners.dub.co/(apply)/[programSlug]/page.tsx
@@ -36,7 +36,7 @@ export default async function ApplyPage({
>
<Header program={program} />
<div className="p-6">
- <LanderHero program={program} />
+ <LanderHero program={program} landerData={landerData} />
{/* Program details grid */}
<LanderRewards program={program} />
diff --git a/apps/web/ui/partners/design/branding-form.tsx b/apps/web/ui/partners/design/branding-form.tsx
index dc731a6334..915555dd54 100644
--- a/apps/web/ui/partners/design/branding-form.tsx
+++ b/apps/web/ui/partners/design/branding-form.tsx
@@ -243,7 +243,7 @@ function LanderPreview({ program }: { program: ProgramWithLanderDataProps }) {
<EditToolbar onEdit={() => setShowEditHeroModal(true)} />
<div className="mx-auto max-w-screen-sm">
<div className="px-6">
- <LanderHero program={program} />
+ <LanderHero program={program} landerData={landerData} />
</div>
</div>
</div>
diff --git a/apps/web/ui/partners/lander-hero.tsx b/apps/web/ui/partners/lander-hero.tsx
index 68cb5b79d5..ffd791c90b 100644
--- a/apps/web/ui/partners/lander-hero.tsx
+++ b/apps/web/ui/partners/lander-hero.tsx
@@ -1,11 +1,14 @@
+import { ProgramLanderData } from "@/lib/types";
import { cn } from "@dub/utils";
import { Program } from "@prisma/client";
export function LanderHero({
program,
+ landerData,
preview,
}: {
program: Pick<Program, "name">;
+ landerData: Pick<ProgramLanderData, "title" | "description">;
preview?: boolean;
}) {
const Heading = preview ? "div" : "h1";
@@ -26,7 +29,7 @@ export function LanderHero({
"animate-slide-up-fade [--offset:5px] [animation-delay:100ms] [animation-duration:1s] [animation-fill-mode:both]",
)}
>
- Join the {program.name} affiliate program
+ {landerData.title || `Join the ${program.name} affiliate program`}
</Heading>
<p
className={cn(
@@ -34,9 +37,8 @@ export function LanderHero({
"animate-slide-up-fade [--offset:5px] [animation-delay:200ms] [animation-duration:1s] [animation-fill-mode:both]",
)}
>
- Share {program.name} with your audience and for each subscription
- generated through your referral, you'll earn a share of the revenue on
- any plans they purchase.
+ {landerData.description ||
+ `Share ${program.name} with your audience and for each subscription generated through your referral, you'll earn a share of the revenue on any plans they purchase.`}
</p>
</div>
);