perf: make display more natural

Signed-off-by: d0zingcat <iamtangli42@gmail.com>
This commit is contained in:
2026-01-04 20:06:24 +08:00
parent a47e678167
commit fe6e00d17d

View File

@@ -262,7 +262,12 @@ export function NotionPage({
// Use state to store filtered recordMap, initialized with original
const [filteredRecordMap, setFilteredRecordMap] =
React.useState<types.ExtendedRecordMap | undefined>(recordMap)
React.useState<types.ExtendedRecordMap | undefined>(() => {
if (config.isI18nEnabled && recordMap) {
return filterRecordMapByLanguage(recordMap, 'en')
}
return recordMap
})
// Apply language filtering only after mount to avoid hydration mismatch
React.useEffect(() => {