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
+8 -5
View File
@@ -2,11 +2,14 @@ import type { EmailAddress } from '../content/types';
const invalidPart = (part: string) => part === '' || /[\s@]/.test(part);
// Zegt of de delen een geldig adres geven, zonder het samen te voegen. Zo
// weten de pagina's al voor de hydratatie of er een adres is (BR-MAIL-08).
export function isEmailAddressValid({ user, domain }: EmailAddress): boolean {
return !invalidPart(user) && !invalidPart(domain) && domain.includes('.');
}
// Voegt het e-mailadres pas in de browser samen (BR-EMAIL-01). Geeft null bij
// ongeldige delen, zodat de footer de Contact-kolom kan weglaten (BR-EMAIL-02).
export function emailAddress({ user, domain }: EmailAddress): string | null {
if (invalidPart(user) || invalidPart(domain) || !domain.includes('.')) {
return null;
}
return `${user}@${domain}`;
export function emailAddress(parts: EmailAddress): string | null {
return isEmailAddressValid(parts) ? `${parts.user}@${parts.domain}` : null;
}