Skip to content

chore: consent banner check on server#4787

Draft
Barsnes wants to merge 4 commits intomainfrom
www/server-consent
Draft

chore: consent banner check on server#4787
Barsnes wants to merge 4 commits intomainfrom
www/server-consent

Conversation

@Barsnes
Copy link
Copy Markdown
Member

@Barsnes Barsnes commented Apr 24, 2026

Summary

Checks

Co-authored-by: Copilot <copilot@github.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 24, 2026

⚠️ No Changeset found

Latest commit: 800d97c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 loader in layouts/root that parses the consent cookie and returns showConsentBanner.
  • Update RootLayout to render ConsentBanner based on loaderData.
  • Remove the client-side useShowConsentBanner hook.

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.

Comment thread apps/www/app/layouts/root/layout.tsx Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 24, 2026

Preview deployments for this pull request:

www - 24. Apr 2026 - 14:45

Barsnes and others added 3 commits April 24, 2026 14:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants