Conversation
Co-authored-by: Copilot <copilot@github.com>
|
There was a problem hiding this comment.
Pull request overview
Moves the “show consent banner” decision from a client-side hook to a server-side loader so the banner can be rendered correctly on first response (SSR) based on the consent cookie.
Changes:
- Add a
loaderinlayouts/rootthat parses the consent cookie and returnsshowConsentBanner. - Update
RootLayoutto renderConsentBannerbased onloaderData. - Remove the client-side
useShowConsentBannerhook.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/www/app/layouts/root/layout.tsx | Adds server-side cookie parsing in the loader and switches banner rendering to loaderData.showConsentBanner. |
| apps/www/app/_hooks/use-show-consent-banner.ts | Removes the client-side banner visibility hook. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Preview deployments for this pull request: www - |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Summary
Checks
pnpm changesetif relevant)