@@ -12,7 +12,8 @@ import DocRootLayout from "@theme/DocRoot/Layout";
1212import NotFoundContent from "@theme/NotFound/Content" ;
1313import type { Props } from "@theme/DocRoot" ;
1414import styles from "./style.module.scss" ;
15-
15+ import { StyleProvider , createCache } from "@ant-design/cssinjs" ;
16+ const cache = createCache ( ) ;
1617export default function DocRoot ( props : Props ) : ReactNode {
1718 const currentDocRouteMetadata = useDocRootMetadata ( props ) ;
1819 if ( ! currentDocRouteMetadata ) {
@@ -22,12 +23,14 @@ export default function DocRoot(props: Props): ReactNode {
2223 }
2324 const { docElement, sidebarName, sidebarItems } = currentDocRouteMetadata ;
2425 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 >
3235 ) ;
3336}
0 commit comments