From 91ab1c62392434293273b8b0e6fba7e5b2ef2777 Mon Sep 17 00:00:00 2001 From: lezi-fun <177434121+lezi-fun@users.noreply.github.com> Date: Tue, 11 Aug 2026 10:25:24 +0800 Subject: [PATCH] fix: loading title double-render + spinner restart (hydration) Inline script fills cached name into #loadingTitle before React hydrate; React then saw text mismatch and rewrote the DOM, making the name appear twice and restarting the spinner animation. Add suppressHydrationWarning so React keeps the script-filled content. --- components/LoadingScreen.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/LoadingScreen.js b/components/LoadingScreen.js index eb53609..0f1f20b 100644 --- a/components/LoadingScreen.js +++ b/components/LoadingScreen.js @@ -9,7 +9,9 @@ export default function LoadingScreen({ forumName, forumNameLoaded }) {
-
+ {/* suppressHydrationWarning: 内联脚本会在 hydrate 前填入缓存名, + 避免 React 检测到文本不匹配而重写 DOM(名字二次出现/转圈重启) */} +
{forumNameLoaded && forumName}
加载中...