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.

Hook up form controls

Tim Wilson29f0663cd330
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/programs/[programId]/branding/landing/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/programs/[programId]/branding/landing/page-client.tsx
index 0b84733795..7f73393e77 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/programs/[programId]/branding/landing/page-client.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/programs/[programId]/branding/landing/page-client.tsx
@@ -112,9 +112,9 @@ function LanderPreview({ program }: { program: ProgramWithLanderDataProps }) {
const scrollRef = useRef<HTMLDivElement>(null);
const scrolled = useScroll(0, { container: scrollRef });
- const landerData = program.landerData ?? { blocks: [] };
-
- const brandColor = useWatch({ name: "brandColor" });
+ const [landerData, brandColor, logo, wordmark] = useWatch({
+ name: ["landerData", "brandColor", "logo", "wordmark"],
+ });
return (
<PreviewWindow
@@ -145,10 +145,10 @@ function LanderPreview({ program }: { program: ProgramWithLanderDataProps }) {
/>
<div className="animate-fade-in my-0.5 block">
- {program.wordmark || program.logo ? (
+ {wordmark || logo ? (
<img
className="max-h-7 max-w-32"
- src={(program.wordmark ?? program.logo) as string}
+ src={(wordmark ?? logo) as string}
/>
) : (
<Wordmark className="h-7" />