fix: <html> 加 suppressHydrationWarning — 沉浸式翻译插件注入属性触发 hydration 告警
This commit is contained in:
@@ -42,6 +42,11 @@ export default function RootLayout({
|
||||
return (
|
||||
<html
|
||||
lang="zh-CN"
|
||||
// 浏览器插件(沉浸式翻译等)会在 hydration 前往 <html> 注入
|
||||
// data-immersive-translate-page-theme 等属性,触发属性级 hydration
|
||||
// 告警;suppressHydrationWarning 只忽略该元素的属性差异,
|
||||
// 不影响子树的正常 mismatch 检测。
|
||||
suppressHydrationWarning
|
||||
className={`${tiktokSans.variable} ${geistMono.variable} ${departureMono.variable}`}
|
||||
>
|
||||
<head>
|
||||
|
||||
Reference in New Issue
Block a user