Spaces:
Sleeping
Sleeping
Download src/lib/createEmotionCache.ts from fullstuckdev/ai-document-assistant: direct link, hf CLI and curl.
- Browser
- Download file 461 Bytes
-
https://huggingface.co/spaces/fullstuckdev/ai-document-assistant/resolve/main/src/lib/createEmotionCache.ts
- Command line
-
hf download hf://spaces/fullstuckdev/ai-document-assistant/src/lib/createEmotionCache.ts
-
curl -L -o createEmotionCache.ts https://huggingface.co/spaces/fullstuckdev/ai-document-assistant/resolve/main/src/lib/createEmotionCache.ts
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 | |
| }) | |
| } |