@@ -12,7 +12,8 @@ import DocRootLayout from "@theme/DocRoot/Layout";
12
12
import NotFoundContent from "@theme/NotFound/Content" ;
13
13
import type { Props } from "@theme/DocRoot" ;
14
14
import styles from "./style.module.scss" ;
15
-
15
+ import { StyleProvider , createCache } from "@ant-design/cssinjs" ;
16
+ const cache = createCache ( ) ;
16
17
export default function DocRoot ( props : Props ) : ReactNode {
17
18
const currentDocRouteMetadata = useDocRootMetadata ( props ) ;
18
19
if ( ! currentDocRouteMetadata ) {
@@ -22,12 +23,14 @@ export default function DocRoot(props: Props): ReactNode {
22
23
}
23
24
const { docElement, sidebarName, sidebarItems } = currentDocRouteMetadata ;
24
25
return (
25
- < HtmlClassNameProvider className = { clsx ( ThemeClassNames . page . docsDocPage ) } >
26
- < div className = { styles . fakeBg } > </ div >
27
- < div className = { styles . cell } > </ div >
28
- < DocsSidebarProvider name = { sidebarName } items = { sidebarItems } >
29
- < DocRootLayout > { docElement } </ DocRootLayout >
30
- </ DocsSidebarProvider >
31
- </ HtmlClassNameProvider >
26
+ < StyleProvider hashPriority = "high" cache = { cache } >
27
+ < HtmlClassNameProvider className = { clsx ( ThemeClassNames . page . docsDocPage ) } >
28
+ < div className = { styles . fakeBg } > </ div >
29
+ < div className = { styles . cell } > </ div >
30
+ < DocsSidebarProvider name = { sidebarName } items = { sidebarItems } >
31
+ < DocRootLayout > { docElement } </ DocRootLayout >
32
+ </ DocsSidebarProvider >
33
+ </ HtmlClassNameProvider >
34
+ </ StyleProvider >
32
35
) ;
33
36
}
0 commit comments