ide-root.tsx 697 B

123456789101112131415161718
  1. import { FC, useState } from 'react'
  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. import { ReactContextRoot } from '@/features/ide-react/context/react-context-root'
  6. import { Loading } from '@/features/ide-react/components/loading'
  7. const IdeRoot: FC = () => {
  8. const [loaded, setLoaded] = useState(false)
  9. return (
  10. <ReactContextRoot>
  11. {loaded ? <IdePage /> : <Loading setLoaded={setLoaded} />}
  12. </ReactContextRoot>
  13. )
  14. }
  15. export default withErrorBoundary(IdeRoot, GenericErrorBoundaryFallback)