From e59d396f200cbeaaf16dffd4fb948fe84ff3be03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Merve=20DAL=C4=9EIN?= <223121038+mervedalgin@users.noreply.github.com> Date: Wed, 18 Nov 2026 22:03:52 +0300 Subject: [PATCH] web: render the 404 text on the client not-found is prerendered in the build-time locale, so a reader whose browser picks another locale hit a hydration mismatch. Render the translated text after mount instead. Co-Authored-By: Claude Opus 5.5 --- web/src/app/not-found.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/src/app/not-found.tsx b/web/src/app/not-found.tsx index 7280378..28536b0 100644 --- a/web/src/app/not-found.tsx +++ b/web/src/app/not-found.tsx @@ -1,11 +1,18 @@ "use client"; +import { useEffect, useState } from "react"; + import Link from "next/link"; import { Button } from "@/components/ui/button"; import { t } from "@/i18n"; export default function NotFound() { + // This page is prerendered in the build-time locale; render the text only on the + // client so a reader in another locale gets no hydration mismatch. + const [mounted, setMounted] = useState(false); + useEffect(() => setMounted(true), []); + if (!mounted) return
; return (

{t("Page not found.")}