mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-25 20:11:09 +00:00
719da5fbd8
IDE page: connection manager and loading screen GitOrigin-RevId: 2cbc8c09aeb36a14eae66da78b267c7a830fb71a
21 lines
856 B
JavaScript
21 lines
856 B
JavaScript
// Configure dynamically loaded assets (via webpack) to be downloaded from CDN
|
|
import '../utils/webpack-public-path'
|
|
|
|
// Set up error reporting, including Sentry
|
|
import '../infrastructure/error-reporter'
|
|
|
|
import ReactDOM from 'react-dom'
|
|
import IdeRoot from '../features/ide-react/components/ide-root'
|
|
|
|
const element = document.getElementById('ide-root')
|
|
if (element) {
|
|
// Remove loading screen provided by the server and replace it with the same
|
|
// screen rendered in React. Could use replaceChildren() instead but browser
|
|
// support is relatively recent (arrived in Safari in 2020)
|
|
element.textContent = ''
|
|
|
|
// This will not be valid in React 18, which has a new API. See
|
|
// https://github.com/reactwg/react-18/discussions/5
|
|
// https://react.dev/blog/2022/03/08/react-18-upgrade-guide#deprecations
|
|
ReactDOM.render(<IdeRoot />, element)
|
|
}
|