From fe6e00d17d3d3e19163d7961badf202457d69bdd Mon Sep 17 00:00:00 2001 From: d0zingcat Date: Sun, 4 Jan 2026 20:06:24 +0800 Subject: [PATCH] perf: make display more natural Signed-off-by: d0zingcat --- components/NotionPage.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/NotionPage.tsx b/components/NotionPage.tsx index 222c0df..cd1f4f4 100644 --- a/components/NotionPage.tsx +++ b/components/NotionPage.tsx @@ -262,7 +262,12 @@ export function NotionPage({ // Use state to store filtered recordMap, initialized with original const [filteredRecordMap, setFilteredRecordMap] = - React.useState(recordMap) + React.useState(() => { + if (config.isI18nEnabled && recordMap) { + return filterRecordMapByLanguage(recordMap, 'en') + } + return recordMap + }) // Apply language filtering only after mount to avoid hydration mismatch React.useEffect(() => {