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.

use brandColor

Steven Tey89c11f3e01ed
diff --git a/apps/web/app/partners.dub.co/(dashboard)/[partnerId]/[programId]/page-client.tsx b/apps/web/app/partners.dub.co/(dashboard)/[partnerId]/[programId]/page-client.tsx
index 2455c8679b..8523810d97 100644
--- a/apps/web/app/partners.dub.co/(dashboard)/[partnerId]/[programId]/page-client.tsx
+++ b/apps/web/app/partners.dub.co/(dashboard)/[partnerId]/[programId]/page-client.tsx
@@ -59,13 +59,13 @@ export default function ProgramPageClient() {
};
const program = programEnrollment?.program;
- const color =
- program?.id === "prog_MqN7G1vSbuSELpYJwioHyDE8" ? "#8B5CF6" : undefined;
return (
<MaxWidthWrapper className="pb-10">
<div className="relative flex flex-col rounded-lg border border-neutral-300 bg-gradient-to-r from-neutral-50 p-4 md:p-6">
- {program && <HeroBackground logo={program?.logo} color={color} />}
+ {program && (
+ <HeroBackground logo={program?.logo} color={program?.brandColor} />
+ )}
<span className="flex items-center gap-2 text-sm text-neutral-500">
<MoneyBill2 className="size-4" />
Refer and earn
@@ -112,7 +112,7 @@ export default function ProgramPageClient() {
start: start ? new Date(start) : undefined,
end: end ? new Date(end) : undefined,
interval,
- color,
+ color: program?.brandColor ?? undefined,
}}
>
<div className="mt-6 rounded-lg border border-neutral-300">
diff --git a/apps/web/lib/zod/schemas/programs.ts b/apps/web/lib/zod/schemas/programs.ts
index 65040e5e08..a01f20314d 100644
--- a/apps/web/lib/zod/schemas/programs.ts
+++ b/apps/web/lib/zod/schemas/programs.ts
@@ -14,6 +14,7 @@ export const ProgramSchema = z.object({
name: z.string(),
slug: z.string(),
logo: z.string().nullable(),
+ brandColor: z.string().nullable(),
type: z.nativeEnum(ProgramType),
cookieLength: z.number(),
commissionAmount: z.number(),