The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
update metadata
Steven Teyc51912a98a6f
diff --git a/apps/web/app/partners.dub.co/(apply)/[programSlug]/layout.tsx b/apps/web/app/partners.dub.co/(apply)/[programSlug]/layout.tsxindex 5fd5300a25..7ad564ee4b 100644--- a/apps/web/app/partners.dub.co/(apply)/[programSlug]/layout.tsx+++ b/apps/web/app/partners.dub.co/(apply)/[programSlug]/layout.tsx@@ -1,9 +1,9 @@import { getProgram } from "@/lib/fetchers/get-program";import { getReward } from "@/lib/fetchers/get-reward";+import { formatRewardDescription } from "@/ui/partners/program-reward-description";import { prisma } from "@dub/prisma";import { Prisma } from "@dub/prisma/client";import { Wordmark } from "@dub/ui";-import { currencyFormatter } from "@dub/utils";import { constructMetadata } from "@dub/utils/src/functions";import { notFound } from "next/navigation";import { PropsWithChildren } from "react";@@ -23,15 +23,9 @@ export async function generateMetadata({return constructMetadata({title: `${program.name} Affiliate Program`,- description: `Join the ${program.name} affiliate program and earn ${- reward.type === "percentage"- ? `${reward.amount}%`- : currencyFormatter(reward.amount / 100, {- minimumFractionDigits: 2,- maximumFractionDigits: 2,- })- } on any subscriptions generated through your referral.`,- noIndex: true, // TODO: Remove this once we launch to GA+ description: `Join the ${program.name} affiliate program and earn ${formatRewardDescription(+ { reward },+ )} by referring ${program.name} to your friends and followers.`,});}diff --git a/apps/web/ui/partners/program-reward-description.tsx b/apps/web/ui/partners/program-reward-description.tsxindex 4d699dee44..c437047393 100644--- a/apps/web/ui/partners/program-reward-description.tsx+++ b/apps/web/ui/partners/program-reward-description.tsx@@ -93,7 +93,7 @@ export function formatRewardDescription({if (reward.event === "sale") {if (reward.maxDuration === null) {- parts.push("for lifetime");+ parts.push("for the customer's lifetime");} else if (reward.maxDuration === 0) {parts.push("for the first purchase");} else if (reward.maxDuration && reward.maxDuration > 0) {