mirror of
https://github.com/langgenius/dify.git
synced 2025-12-25 01:00:42 -05:00
feat: convert components to dynamic imports for improved performance (#22614)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user