feat: convert components to dynamic imports for improved performance (#22614)

This commit is contained in:
Wu Tianwei
2025-07-18 11:43:37 +08:00
committed by GitHub
parent 1f9cd99bc2
commit b035f3f884
37 changed files with 493 additions and 472 deletions

View File

@@ -4,10 +4,17 @@ import {
} from '../hooks'
import type { HeaderInNormalProps } from './header-in-normal'
import HeaderInNormal from './header-in-normal'
import HeaderInHistory from './header-in-view-history'
import type { HeaderInRestoringProps } from './header-in-restoring'
import HeaderInRestoring from './header-in-restoring'
import { useStore } from '../store'
import dynamic from 'next/dynamic'
const HeaderInHistory = dynamic(() => import('./header-in-view-history'), {
ssr: false,
})
const HeaderInRestoring = dynamic(() => import('./header-in-restoring'), {
ssr: false,
})
export type HeaderProps = {
normal?: HeaderInNormalProps
restoring?: HeaderInRestoringProps