mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
8821a6d2f4
GitOrigin-RevId: ff6429d6a918413857dd8116611c9857958f68ed
22 lines
790 B
TypeScript
22 lines
790 B
TypeScript
import '../utils/webpack-public-path' // configure dynamically loaded assets (via webpack) to be downloaded from CDN
|
|
import '../infrastructure/error-reporter' // set up error reporting, including Sentry
|
|
import ReactDOM from 'react-dom'
|
|
import IdeRoot from '@/features/ide-react/components/ide-root'
|
|
|
|
ReactDOM.render(<IdeRoot />, document.getElementById('ide-root'))
|
|
|
|
// work around Safari 15's incomplete support for dvh units
|
|
// https://github.com/overleaf/internal/issues/18109
|
|
try {
|
|
if (
|
|
document.body.parentElement &&
|
|
document.body.parentElement?.clientHeight < document.body.clientHeight
|
|
) {
|
|
const rootElement = document.querySelector<HTMLDivElement>('#ide-root')
|
|
if (rootElement) {
|
|
rootElement.style.height = '100vh'
|
|
}
|
|
}
|
|
} catch {
|
|
// ignore errors
|
|
}
|