ide-root.tsx 744 B

12345678910111213141516171819202122
  1. import useWaitForI18n from '@/shared/hooks/use-wait-for-i18n'
  2. import { GenericErrorBoundaryFallback } from '@/shared/components/generic-error-boundary-fallback'
  3. import withErrorBoundary from '@/infrastructure/error-boundary'
  4. import IdePage from '@/features/ide-react/components/layout/ide-page'
  5. function IdeRoot() {
  6. // Check that we haven't inadvertently loaded Angular
  7. // TODO: Remove this before rolling out this component to any users
  8. if (typeof window.angular !== 'undefined') {
  9. throw new Error('Angular detected. This page must not load Angular.')
  10. }
  11. const { isReady } = useWaitForI18n()
  12. if (!isReady) {
  13. return null
  14. }
  15. return <IdePage />
  16. }
  17. export default withErrorBoundary(IdeRoot, GenericErrorBoundaryFallback)