Add /newsletter-confirmed double-opt-in confirmation page
Brevo's redirectionUrl now points here instead of the homepage — a static page matching /bestellbestaetigung's visual language (brand- tinted checkmark circle, serif display heading, thin brand divider). No query params to read; Brevo's confirmation redirect carries nothing this page needs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,7 @@ independent, see the "Monitoring & alerting" section). `STRIPE_SECRET_KEY`,
|
||||
(Stripe)" below. `BREVO_API_KEY`, `BREVO_LIST_ID`,
|
||||
`BREVO_DOUBLE_OPTIN_TEMPLATE_ID` (no safe default — required for
|
||||
newsletter signups to trigger a confirmation email at all),
|
||||
`BREVO_DOI_REDIRECT_URL` (optional, defaults to the homepage) — see
|
||||
`BREVO_DOI_REDIRECT_URL` (optional, defaults to `/newsletter-confirmed`) — see
|
||||
"Newsletter signup" below. Set in Coolify's app settings for production,
|
||||
not in a committed `.env`.
|
||||
|
||||
@@ -1074,9 +1074,13 @@ unsynced.
|
||||
(`POST /v3/contacts/attributes/normal/OPT_IN_SOURCE`) or Brevo silently
|
||||
drops it on every request (no error at all, just never stored) rather
|
||||
than rejecting the request. `redirectionUrl` (where Brevo sends the
|
||||
contact after they click confirm) defaults to the homepage via
|
||||
`BREVO_DOI_REDIRECT_URL` — no dedicated "danke, bestätigt" landing page
|
||||
exists yet.
|
||||
contact after they click confirm) defaults to `/newsletter-confirmed`
|
||||
via `BREVO_DOI_REDIRECT_URL` — a static confirmation page
|
||||
(`app/newsletter-confirmed/page.tsx`), same visual language as
|
||||
`/bestellbestaetigung` (brand-tinted circular checkmark, serif display
|
||||
heading, thin brand divider). No query params to read — Brevo's
|
||||
redirect carries nothing this page needs, unlike `/checkout/verarbeitung`
|
||||
which polls actual payment status.
|
||||
- **`app/lib/useNewsletterSignup.ts`** — the shared email/consent/submit
|
||||
state + on-blur validation + refocus-on-invalid-submit behind all four
|
||||
forms (same "state of the art, simple" input-quality bar as checkout's
|
||||
|
||||
Reference in New Issue
Block a user