diff --git a/services/web/frontend/js/features/ide-react/components/history-container.tsx b/services/web/frontend/js/features/ide-react/components/history-container.tsx new file mode 100644 index 0000000000..32c4b2c70b --- /dev/null +++ b/services/web/frontend/js/features/ide-react/components/history-container.tsx @@ -0,0 +1,25 @@ +import { useLayoutContext } from '../../../shared/context/layout-context' +import { FullSizeLoadingSpinner } from '../../../shared/components/loading-spinner' +import { ErrorBoundaryFallback } from '../../../shared/components/error-boundary-fallback' +import withErrorBoundary from '../../../infrastructure/error-boundary' +import { lazy, Suspense } from 'react' + +const HistoryRoot = lazy( + () => import('@/features/ide-react/components/history-root') +) + +function HistoryContainer() { + const { view } = useLayoutContext() + + if (view !== 'history') { + return null + } + + return ( + }> + + + ) +} + +export default withErrorBoundary(HistoryContainer, ErrorBoundaryFallback) diff --git a/services/web/frontend/js/features/ide-react/components/history-root.tsx b/services/web/frontend/js/features/ide-react/components/history-root.tsx new file mode 100644 index 0000000000..6dad985eda --- /dev/null +++ b/services/web/frontend/js/features/ide-react/components/history-root.tsx @@ -0,0 +1,11 @@ +import { memo } from 'react' +import { HistoryProvider } from '@/features/history/context/history-context' +import History from './history' + +const HistoryRoot = () => ( + + + +) + +export default memo(HistoryRoot) diff --git a/services/web/frontend/js/features/ide-react/components/history-sidebar.tsx b/services/web/frontend/js/features/ide-react/components/history-sidebar.tsx index d929d3f9d1..e010951a46 100644 --- a/services/web/frontend/js/features/ide-react/components/history-sidebar.tsx +++ b/services/web/frontend/js/features/ide-react/components/history-sidebar.tsx @@ -1,5 +1,10 @@ import React from 'react' export function HistorySidebar() { - return