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 ProgramApplicationReminder

Steven Tey8bbdbb9de7ad
diff --git a/apps/web/app/api/cron/program-application-reminder/route.ts b/apps/web/app/api/cron/program-application-reminder/route.ts
index 5a602f5a16..7dc11a7f9a 100644
--- a/apps/web/app/api/cron/program-application-reminder/route.ts
+++ b/apps/web/app/api/cron/program-application-reminder/route.ts
@@ -29,6 +29,7 @@ export async function POST(req: Request) {
select: {
id: true,
name: true,
+ slug: true,
},
},
},
@@ -40,12 +41,13 @@ export async function POST(req: Request) {
);
await sendEmail({
- subject: `Complete your application to ${application.program.name}`,
+ subject: `Complete your application for ${application.program.name}`,
email: application.email,
react: ProgramApplicationReminder({
email: application.email,
program: {
name: application.program.name,
+ slug: application.program.slug,
},
}),
});
diff --git a/packages/email/src/templates/program-application-reminder.tsx b/packages/email/src/templates/program-application-reminder.tsx
index c2b3c67f19..8f3d237076 100644
--- a/packages/email/src/templates/program-application-reminder.tsx
+++ b/packages/email/src/templates/program-application-reminder.tsx
@@ -18,11 +18,13 @@ export default function ProgramApplicationReminder({
email = "[email protected]",
program = {
name: "Acme",
+ slug: "acme",
},
}: {
email: string;
program: {
name: string;
+ slug: string;
};
}) {
return (
@@ -56,7 +58,7 @@ export default function ProgramApplicationReminder({
<Section className="mt-8 text-center">
<Link
- href={"https://partners.dub.co/register"}
+ href={`https://partners.dub.co/${program.slug}/register`}
className="box-border block w-full rounded-md bg-black px-0 py-4 text-center text-sm font-medium leading-none text-white no-underline"
>
Create your Dub Partners account