The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix meta tags, duration display
Steven Teyd5df56778889
diff --git a/apps/web/app/partners.dub.co/(apply)/apply/[programSlug]/details-grid.tsx b/apps/web/app/partners.dub.co/(apply)/apply/[programSlug]/details-grid.tsxindex 287aa18cc0..1a41588f18 100644--- a/apps/web/app/partners.dub.co/(apply)/apply/[programSlug]/details-grid.tsx+++ b/apps/web/app/partners.dub.co/(apply)/apply/[programSlug]/details-grid.tsx@@ -6,10 +6,7 @@ export function DetailsGrid({program,className,}: {- program: Pick<- Program,- "commissionAmount" | "commissionType" | "isLifetimeRecurring"- >;+ program: Program;className?: string;}) {return (@@ -29,7 +26,9 @@ export function DetailsGrid({{icon: Calendar6,title: "Duration",- value: program.isLifetimeRecurring ? "Lifetime" : "Recurring",+ value: program.isLifetimeRecurring+ ? "Lifetime"+ : `${program.recurringDuration} ${program.recurringInterval}s`,},].map(({ icon: Icon, title, value }) => (<div className="rounded-xl bg-neutral-100 p-4">diff --git a/apps/web/app/partners.dub.co/(apply)/apply/[programSlug]/page.tsx b/apps/web/app/partners.dub.co/(apply)/apply/[programSlug]/page.tsxindex 0473ee4238..bfaa1054e8 100644--- a/apps/web/app/partners.dub.co/(apply)/apply/[programSlug]/page.tsx+++ b/apps/web/app/partners.dub.co/(apply)/apply/[programSlug]/page.tsx@@ -1,7 +1,8 @@import { prisma } from "@/lib/prisma";import { programLanderSchema } from "@/lib/zod/schemas/programs";import { BLOCK_COMPONENTS } from "@/ui/partners/lander-blocks";-import { cn } from "@dub/utils";+import { cn, currencyFormatter } from "@dub/utils";+import { constructMetadata } from "@dub/utils/src/functions";import { notFound } from "next/navigation";import { CSSProperties } from "react";import { ApplyButton } from "./apply-button";@@ -23,10 +24,18 @@ export async function generateMetadata({notFound();}- return {- title: `Apply to the ${program.name} affiliate program`,- description: `Earn ${program.commissionAmount} on any subscriptions generated through your referral.`,- };+ return constructMetadata({+ title: `${program.name} Affiliate Program`,+ description: `Join the ${program.name} affiliate program and earn ${+ program.commissionType === "percentage"+ ? `${program.commissionAmount}%`+ : currencyFormatter(program.commissionAmount / 100, {+ minimumFractionDigits: 2,+ maximumFractionDigits: 2,+ })+ } on any subscriptions generated through your referral.`,+ noIndex: true, // TODO: Remove this once we launch to GA+ });}export default async function ApplyPage({