Quellcode durchsuchen

[web] Remove dead code: history-content & history-root (#20959)

They are duplicated by:
* services/web/frontend/js/features/ide-react/components/history.tsx
* services/web/frontend/js/features/ide-react/components/history-root.tsx

GitOrigin-RevId: c3f13ea9016530182ae623b06e91a9fdb2be7a87
Antoine Clausse vor 2 Jahren
Ursprung
Commit
d77ca18b0b

+ 0 - 33
services/web/frontend/js/features/history/components/history-content.tsx

@@ -1,33 +0,0 @@
-import { useHistoryContext } from '@/features/history/context/history-context'
-import LoadingSpinner from '@/shared/components/loading-spinner'
-import DiffView from '@/features/history/components/diff-view/diff-view'
-import ChangeList from '@/features/history/components/change-list/change-list'
-import { createPortal } from 'react-dom'
-import HistoryFileTree from '@/features/history/components/history-file-tree'
-
-const fileTreeContainer = document.getElementById('history-file-tree')
-
-export default function HistoryContent() {
-  const { updatesInfo } = useHistoryContext()
-
-  let content
-  if (updatesInfo.loadingState === 'loadingInitial') {
-    content = <LoadingSpinner />
-  } else {
-    content = (
-      <>
-        <DiffView />
-        <ChangeList />
-      </>
-    )
-  }
-
-  return (
-    <>
-      {fileTreeContainer
-        ? createPortal(<HistoryFileTree />, fileTreeContainer)
-        : null}
-      <div className="history-react">{content}</div>
-    </>
-  )
-}

+ 0 - 32
services/web/frontend/js/features/history/components/history-root.tsx

@@ -1,32 +0,0 @@
-import { HistoryProvider } from '../context/history-context'
-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 HistoryContent = lazy(() => import('./history-content'))
-
-function Main() {
-  const { view } = useLayoutContext()
-
-  if (view !== 'history') {
-    return null
-  }
-
-  return (
-    <Suspense fallback={<FullSizeLoadingSpinner delay={500} />}>
-      <HistoryContent />
-    </Suspense>
-  )
-}
-
-function HistoryRoot() {
-  return (
-    <HistoryProvider>
-      <Main />
-    </HistoryProvider>
-  )
-}
-
-export default withErrorBoundary(HistoryRoot, ErrorBoundaryFallback)