|
@@ -1,18 +1,15 @@
|
|
|
import ChangeList from './change-list/change-list'
|
|
import ChangeList from './change-list/change-list'
|
|
|
import DiffView from './diff-view/diff-view'
|
|
import DiffView from './diff-view/diff-view'
|
|
|
-import { useLayoutContext } from '../../../shared/context/layout-context'
|
|
|
|
|
import { HistoryProvider, useHistoryContext } from '../context/history-context'
|
|
import { HistoryProvider, useHistoryContext } from '../context/history-context'
|
|
|
import { createPortal } from 'react-dom'
|
|
import { createPortal } from 'react-dom'
|
|
|
import HistoryFileTree from './history-file-tree'
|
|
import HistoryFileTree from './history-file-tree'
|
|
|
-import getMeta from '../../../utils/meta'
|
|
|
|
|
|
|
|
|
|
const fileTreeContainer = document.getElementById('history-file-tree')
|
|
const fileTreeContainer = document.getElementById('history-file-tree')
|
|
|
|
|
|
|
|
function Main() {
|
|
function Main() {
|
|
|
- const { view } = useLayoutContext()
|
|
|
|
|
const { updates } = useHistoryContext()
|
|
const { updates } = useHistoryContext()
|
|
|
|
|
|
|
|
- if (view !== 'history' || updates.length === 0) {
|
|
|
|
|
|
|
+ if (updates.length === 0) {
|
|
|
return null
|
|
return null
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -30,12 +27,6 @@ function Main() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export default function HistoryRoot() {
|
|
export default function HistoryRoot() {
|
|
|
- const isReact = getMeta('ol-splitTestVariants')?.['history-view'] === 'react'
|
|
|
|
|
-
|
|
|
|
|
- if (!isReact) {
|
|
|
|
|
- return null
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
return (
|
|
return (
|
|
|
<HistoryProvider>
|
|
<HistoryProvider>
|
|
|
<Main />
|
|
<Main />
|