Updates the packages and the banner live in the browser

The build still bakes the current packages and the active banner into the HTML.
After hydration the page asks /api/v1/offerings and /api/v1/offerings/banner
once and replaces what differs; errors and time-outs keep what was baked, and
a 204 from the banner route hides the banner. The banner is now the
OfferingBanner contract (title, text, optional link) instead of layout=banner.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-12 11:19:50 +01:00
co-authored by Claude Sonnet 5.5
parent f9180f231f
commit 12319bb841
22 changed files with 584 additions and 180 deletions
+2 -1
View File
@@ -10,7 +10,7 @@ import PageIntro from '../components/PageIntro/PageIntro';
import PageSection from '../components/PageSection/PageSection';
import Reveal from '../components/Reveal/Reveal';
import contactContent from '../content/contactContent';
import packages from '../content/packages';
import { usePackages } from '../components/PackagesProvider/PackagesProvider';
import siteContent from '../content/siteContent';
import { withReplyTime } from '../lib/withReplyTime';
import useHydrated from '../hooks/useHydrated';
@@ -50,6 +50,7 @@ export const Route = createFileRoute('/contact')({
// form (BR-CP-01..04). The card is in the page twice, one per layout, so the
// reading order always matches what is shown.
function Contact() {
const packages = usePackages();
const { pakket: searched } = Route.useSearch();
// The search only counts after hydration, so the prerendered HTML and the
// first browser render agree (BR-HYD-10)