Skip to content

Re-add the cookie consent banner (one-line flip) - #85

Merged
lksbrssr merged 1 commit into
mainfrom
chore/reenable-cookie-banner
Jul 24, 2026
Merged

Re-add the cookie consent banner (one-line flip)#85
lksbrssr merged 1 commit into
mainfrom
chore/reenable-cookie-banner

Conversation

@lksbrssr

@lksbrssr lksbrssr commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Companion to #84 — the easy "add it back" button

This PR restores the cookie consent banner. It's intentionally tiny: the whole flow already lives in the repo behind the NEXT_PUBLIC_COOKIE_CONSENT flag introduced in #84, so re-enabling is a one-line default flip.

Merging this makes the consent banner show again by default:

  • ✅ Consent banner is shown (auto for EU/EEA/UK, on-demand elsewhere via the footer).
  • ✅ Footer "Cookie settings" link returns.
  • ✅ Region-detection middleware runs again.
  • ✅ Google Analytics only loads after the visitor agrees.

NEXT_PUBLIC_COOKIE_CONSENT=off still opts back out at any time.

How to use

  • Want the banner back: merge this PR (or just set NEXT_PUBLIC_COOKIE_CONSENT=on).
  • Keep it off: close this PR; the flag stays off by default.

Files changed

  • src/lib/cookie-consent.ts — flag default on (=== 'on'!== 'off')
  • .env.example / README.md — doc the flipped default

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plrd.org Ready Ready Preview, Comment Jul 24, 2026 10:11am

Request Review

@lksbrssr
lksbrssr changed the base branch from chore/remove-cookie-banner to main July 24, 2026 10:09
Flip NEXT_PUBLIC_COOKIE_CONSENT to default ON: the consent banner and footer
'Cookie settings' link are shown again, region detection runs, and Google
Analytics only loads after the visitor agrees. Set NEXT_PUBLIC_COOKIE_CONSENT=off
to opt back out.
@lksbrssr
lksbrssr force-pushed the chore/reenable-cookie-banner branch from c47cdcb to 725aa3d Compare July 24, 2026 10:09
@lksbrssr
lksbrssr merged commit cfe9862 into main Jul 24, 2026
2 checks passed
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.

1 participant