Refactor marketing hero component for improved Statsig integration#2943
Refactor marketing hero component for improved Statsig integration#2943
Conversation
- Updated the `custom-hero.svelte` component to conditionally assign hero subtitle and layout based on Statsig client responses, preventing unnecessary UI flashes. - Adjusted the `+page.ts` file to set `prerender = false`, ensuring the marketing page loads per request with real cookies and avoids layout inconsistencies. - Enhanced documentation in `README.md` to clarify the implications of SSR and client-side rendering for the marketing homepage. These changes aim to enhance user experience by ensuring a seamless integration of Statsig-driven features while maintaining layout stability.
Greptile SummaryThis PR fixes a visible layout flash on the marketing homepage by switching the route from Confidence Score: 4/5Safe to merge; the logic is sound and the only finding is a now-unreachable dead code block. All findings are P2. The src/routes/(marketing)/+page.server.ts — Important Files Changed
|
custom-hero.sveltecomponent to conditionally assign hero subtitle and layout based on Statsig client responses, preventing unnecessary UI flashes.+page.tsfile to setprerender = false, ensuring the marketing page loads per request with real cookies and avoids layout inconsistencies.README.mdto clarify the implications of SSR and client-side rendering for the marketing homepage.These changes aim to enhance user experience by ensuring a seamless integration of Statsig-driven features while maintaining layout stability.
What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)