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
@@ -9,6 +9,7 @@ import siteContent from '../content/siteContent';
import type { ShootTypeId } from '../content/types';
import { isShootTypeId } from '../lib/portfolioFilters';
import { visibleSocials } from '../lib/visibleSocials';
import useHydrated from '../hooks/useHydrated';
import { galleryImages, pageHead, structuredDataScript, webPage } from '../seo';
// ?shoot= from a filter or a "Bekijk meer …foto's" link: only a known shoot
@@ -42,7 +43,10 @@ export const Route = createFileRoute('/portfolio')({
// The portfolio (LAYOUT.md: Intro → Portfolio → Instagram): the photos with
// filters and lightbox, then the same Instagram block as on the homepage
function Portfolio() {
const { shoot } = Route.useSearch();
const { shoot: searched } = Route.useSearch();
// The filter only applies after hydration, so the prerendered HTML and the
// first browser render agree (BR-HYD-10)
const shoot = useHydrated() ? searched : undefined;
const navigate = useNavigate({ from: Route.fullPath });
const { intro, photos } = portfolioContent;
// Without a valid https link the tiles would lead nowhere: no section