ide-root.tsx 956 B

1234567891011121314151617181920212223242526
  1. import { GenericErrorBoundaryFallback } from '@/shared/components/generic-error-boundary-fallback'
  2. import withErrorBoundary from '@/infrastructure/error-boundary'
  3. import IdePage from '@/features/ide-react/components/layout/ide-page'
  4. import { ReactContextRoot } from '@/features/ide-react/context/react-context-root'
  5. import { Loading } from '@/features/ide-react/components/loading'
  6. import getMeta from '@/utils/meta'
  7. function IdeRoot() {
  8. // Check that we haven't inadvertently loaded Angular
  9. // TODO: Remove this before rolling out this component to any users
  10. if (typeof window.angular !== 'undefined') {
  11. throw new Error('Angular detected. This page must not load Angular.')
  12. }
  13. const loadingText = getMeta('ol-loadingText')
  14. return (
  15. <ReactContextRoot>
  16. <Loading loadingText={loadingText}>
  17. <IdePage />
  18. </Loading>
  19. </ReactContextRoot>
  20. )
  21. }
  22. export default withErrorBoundary(IdeRoot, GenericErrorBoundaryFallback)