2022-11-28 01:08:38 +00:00
|
|
|
import './polyfills'
|
2022-08-09 01:04:04 +00:00
|
|
|
import ReactDOM from 'react-dom/client'
|
2022-08-21 15:44:01 +00:00
|
|
|
import 'typeface-roboto'
|
2022-08-08 02:06:40 +00:00
|
|
|
|
2024-04-10 01:54:41 +00:00
|
|
|
import 'modern-normalize/modern-normalize.css'
|
|
|
|
import './index.css'
|
2024-03-13 02:44:43 +00:00
|
|
|
|
|
|
|
import { ThemeProvider, createTheme } from '@mui/material/styles'
|
|
|
|
import { PrismAsyncLight as SyntaxHighlighter } from 'react-syntax-highlighter'
|
|
|
|
|
2023-12-09 23:47:05 +00:00
|
|
|
import Init from './Init'
|
|
|
|
import reportWebVitals from './reportWebVitals'
|
2022-08-09 01:04:04 +00:00
|
|
|
|
2024-03-13 02:44:43 +00:00
|
|
|
// NOTE: This is a workaround for MUI components attempting to access theme code
|
|
|
|
// before it has loaded.
|
|
|
|
// See: https://stackoverflow.com/a/76017295/470685
|
|
|
|
;<ThemeProvider theme={createTheme()} />
|
|
|
|
|
|
|
|
// NOTE: This is a workaround for SyntaxHighlighter not working reliably in the
|
|
|
|
// EmbedCodeDialog component. It seems to have the effect of warming some
|
|
|
|
// sort of internal cache that avoids a race condition within
|
|
|
|
// SyntaxHighlighter.
|
|
|
|
// See: https://github.com/react-syntax-highlighter/react-syntax-highlighter/issues/513
|
|
|
|
ReactDOM.createRoot(document.createElement('div')).render(
|
|
|
|
<SyntaxHighlighter language="" children={''} />
|
|
|
|
)
|
|
|
|
|
2022-08-09 02:04:37 +00:00
|
|
|
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
|
2023-12-09 23:47:05 +00:00
|
|
|
root.render(<Init />)
|
2022-08-08 02:06:40 +00:00
|
|
|
|
|
|
|
// If you want to start measuring performance in your app, pass a function
|
|
|
|
// to log results (for example: reportWebVitals(console.log))
|
|
|
|
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
2022-08-09 02:04:37 +00:00
|
|
|
reportWebVitals()
|