From a4a17d41dcabd5167cef6422a022e0e902eab762 Mon Sep 17 00:00:00 2001 From: Tony Tang Date: Mon, 5 Jan 2026 10:15:32 +0800 Subject: [PATCH] perf: make display more natural (#2) --- 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(() => {