ai-document-assistant / src /lib /createEmotionCache.ts
fullstuckdev's picture
Upload 25 files
2341446 verified
raw
history blame contribute delete
461 Bytes
import createCache from '@emotion/cache'
const isBrowser = typeof document !== 'undefined'
export default function createEmotionCache() {
let insertionPoint
if (isBrowser) {
const emotionInsertionPoint = document.querySelector<HTMLMetaElement>(
'meta[name="emotion-insertion-point"]'
)
insertionPoint = emotionInsertionPoint ?? undefined
}
return createCache({
key: 'mui-style',
insertionPoint,
prepend: true
})
}