Makes the first render match the prerendered HTML

Search values, the 404 buttons and the footer year now apply after hydration.
The e-mail address stays out of the HTML behind a placeholder, and all review
texts are in the page, so crawlers can read them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 18:17:26 +01:00
co-authored by Claude Opus 5.5
parent 1574726c1d
commit 2c2e27e337
32 changed files with 1322 additions and 148 deletions
+5 -1
View File
@@ -1,4 +1,5 @@
import { useRouterState } from '@tanstack/react-router';
import useHydrated from '@/hooks/useHydrated';
import { isShootSectionPath } from '@/lib/isShootSectionPath';
import LinkButton from '../LinkButton';
import StatusPage from './StatusPage';
@@ -9,6 +10,9 @@ import StatusPage from './StatusPage';
// Onder /soorten-fotoshoots/ komt er een knop naar het overzicht bij
// (FR-ST-14).
export default function NotFound() {
// De prerender is gemaakt voor /404; het echte pad telt pas na de
// hydratatie, anders verschilt de eerste render van de HTML (BR-404-04)
const hydrated = useHydrated();
const pathname = useRouterState({
select: (routerState) => routerState.location.pathname,
});
@@ -20,7 +24,7 @@ export default function NotFound() {
<StatusPage
title="Pagina niet gevonden"
actions={
isShootSectionPath(pathname) ? (
hydrated && isShootSectionPath(pathname) ? (
<>
<LinkButton
to="/soorten-fotoshoots"