From 1afa7d905b01466b652e717edbe24402799b8f51 Mon Sep 17 00:00:00 2001 From: Sluijsens Date: Sun, 25 Oct 2026 20:14:28 +0100 Subject: [PATCH] Aligns the submit button right and starts the contact page at the top The submit button of the contact form now sits on the right, with the privacy line below it, on the homepage and the contact page. Arriving on the contact page from a link further down another page now starts at the top: removing ?pakket= from the address no longer cancels the router's scroll reset. Co-Authored-By: Claude Opus 5.5 --- web/src/components/ContactForm/ContactForm.tsx | 5 +++-- web/src/routes/contact.tsx | 12 ++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/web/src/components/ContactForm/ContactForm.tsx b/web/src/components/ContactForm/ContactForm.tsx index 3251d34..40097d7 100644 --- a/web/src/components/ContactForm/ContactForm.tsx +++ b/web/src/components/ContactForm/ContactForm.tsx @@ -292,14 +292,15 @@ export default function ContactForm({ {disabled ? 'Versturen…' : '(Aan)vraag versturen'} - + {/* Under the submit button, aligned with it */} + ); diff --git a/web/src/routes/contact.tsx b/web/src/routes/contact.tsx index 9597755..ba613c1 100644 --- a/web/src/routes/contact.tsx +++ b/web/src/routes/contact.tsx @@ -40,16 +40,12 @@ function Contact() { const { email, socials, contactForm } = siteContent; // The panel has taken the package over; tidy the address bar without a - // history entry. It is a fresh page, so no scrolling or focus move - // (BR-CP-12). + // history entry and without a focus move (BR-CP-12). This navigation can + // replace the one that brought the visitor here before the router has + // scrolled for it, so it keeps the reset to the top of the page. useEffect(() => { if (pakket === undefined) return; - void navigate({ - to: '/contact', - search: {}, - replace: true, - resetScroll: false, - }); + void navigate({ to: '/contact', search: {}, replace: true }); }, [pakket, navigate]); const details = (variant: 'narrow' | 'wide') => (