ide.tsx 841 B

1234567891011121314151617181920212223
  1. import '../utils/webpack-public-path' // configure dynamically loaded assets (via webpack) to be downloaded from CDN
  2. import '../infrastructure/error-reporter' // set up error reporting, including Sentry
  3. import '../infrastructure/hotjar' // set up Hotjar
  4. import ReactDOM from 'react-dom'
  5. import IdeRoot from '@/features/ide-react/components/ide-root'
  6. ReactDOM.render(<IdeRoot />, document.getElementById('ide-root'))
  7. // work around Safari 15's incomplete support for dvh units
  8. // https://github.com/overleaf/internal/issues/18109
  9. try {
  10. if (
  11. document.body.parentElement &&
  12. document.body.parentElement?.clientHeight < document.body.clientHeight
  13. ) {
  14. const rootElement = document.querySelector<HTMLDivElement>('#ide-root')
  15. if (rootElement) {
  16. rootElement.style.height = '100vh'
  17. }
  18. }
  19. } catch {
  20. // ignore errors
  21. }