File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1+ /* eslint-disable @typescript-eslint/ban-types */
12import * as React from "react" ;
23import type createEmotionServer_t from "@emotion/server/create-instance" ;
34import type { DocumentContext } from "next/document" ;
@@ -17,8 +18,13 @@ export function createEmotionSsrAdvancedApproach(
1718 options : Omit < OptionsOfCreateCache , "insertionPoint" > & {
1819 prepend ?: boolean ;
1920 } ,
20- /** By default <CacheProvider /> from 'import { CacheProvider } from "@emotion/react"' */
21- CacheProvider : React . Provider < EmotionCache > = DefaultCacheProvider
21+ /**
22+ * By default <CacheProvider /> from 'import { CacheProvider } from "@emotion/react"'
23+ *
24+ * NOTE: The actual expected type is `React.Provider<EmotionCache>` but we use `Function` because
25+ * to make it work regardless of if you are using React 18 or React 19 type def.
26+ */
27+ CacheProvider : Function = DefaultCacheProvider
2228) {
2329 const { prepend, ...optionsWithoutPrependProp } = options ;
2430
You can’t perform that action at this time.
0 commit comments