2023-11-27 06:26:06 -05:00
|
|
|
import { FC, useState } from 'react'
|
2023-10-02 05:35:02 -04:00
|
|
|
import { GenericErrorBoundaryFallback } from '@/shared/components/generic-error-boundary-fallback'
|
|
|
|
import withErrorBoundary from '@/infrastructure/error-boundary'
|
|
|
|
import IdePage from '@/features/ide-react/components/layout/ide-page'
|
2023-10-16 07:10:43 -04:00
|
|
|
import { ReactContextRoot } from '@/features/ide-react/context/react-context-root'
|
|
|
|
import { Loading } from '@/features/ide-react/components/loading'
|
2023-10-02 05:35:02 -04:00
|
|
|
|
2023-11-27 06:26:06 -05:00
|
|
|
const IdeRoot: FC = () => {
|
|
|
|
const [loaded, setLoaded] = useState(false)
|
2023-10-02 05:35:02 -04:00
|
|
|
|
2023-10-16 07:10:43 -04:00
|
|
|
return (
|
|
|
|
<ReactContextRoot>
|
2023-11-27 06:26:06 -05:00
|
|
|
{loaded ? <IdePage /> : <Loading setLoaded={setLoaded} />}
|
2023-10-16 07:10:43 -04:00
|
|
|
</ReactContextRoot>
|
|
|
|
)
|
2023-10-02 05:35:02 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export default withErrorBoundary(IdeRoot, GenericErrorBoundaryFallback)
|