Skip to content

Commit b0602a2

Browse files
committed
fix(whitelabel): force dynamic rendering for landing segment
Client components in (landing) (e.g. Navbar) read NEXT_PUBLIC_BRAND_* via getEnv. Without this, SSR prerender would bake the build-time process.env values into HTML, mismatching window.__ENV after hydration in Docker runtime-env deployments. Cascades to all landing routes via the layout.
1 parent f40fa93 commit b0602a2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

apps/sim/app/(landing)/layout.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ export const metadata: Metadata = {
1616
},
1717
}
1818

19+
/** Opt the landing segment out of static prerendering so client components like
20+
* Navbar render with the live runtime env (e.g. Docker-injected `NEXT_PUBLIC_BRAND_*`)
21+
* during SSR, avoiding hydration mismatches against `window.__ENV`. */
22+
export const dynamic = 'force-dynamic'
23+
1924
/**
2025
* Landing page route-group layout.
2126
*

0 commit comments

Comments
 (0)