mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #20226 from overleaf/mj-restore-file-badge
[web] Add split test badge for file restore GitOrigin-RevId: 59bbdd4cc5b76141a8bae06c2e7181e5a5c5ccc0
This commit is contained in:
parent
2d9e4965f7
commit
5d57571e96
1 changed files with 8 additions and 1 deletions
|
@ -7,6 +7,7 @@ import ToolbarRestoreFileButton from './toolbar-restore-file-button'
|
||||||
import { isFileRemoved } from '../../../utils/file-diff'
|
import { isFileRemoved } from '../../../utils/file-diff'
|
||||||
import ToolbarRestoreFileToVersionButton from './toolbar-restore-file-to-version-button'
|
import ToolbarRestoreFileToVersionButton from './toolbar-restore-file-to-version-button'
|
||||||
import { useFeatureFlag } from '@/shared/context/split-test-context'
|
import { useFeatureFlag } from '@/shared/context/split-test-context'
|
||||||
|
import SplitTestBadge from '@/shared/components/split-test-badge'
|
||||||
|
|
||||||
type ToolbarProps = {
|
type ToolbarProps = {
|
||||||
diff: Nullable<Diff>
|
diff: Nullable<Diff>
|
||||||
|
@ -34,7 +35,13 @@ export default function Toolbar({ diff, selection }: ToolbarProps) {
|
||||||
<ToolbarRestoreFileButton selection={selection} />
|
<ToolbarRestoreFileButton selection={selection} />
|
||||||
) : null}
|
) : null}
|
||||||
{showRestoreFileToVersionButton ? (
|
{showRestoreFileToVersionButton ? (
|
||||||
<ToolbarRestoreFileToVersionButton selection={selection} />
|
<>
|
||||||
|
<ToolbarRestoreFileToVersionButton selection={selection} />
|
||||||
|
<SplitTestBadge
|
||||||
|
splitTestName="revert-file"
|
||||||
|
displayOnVariants={['enabled']}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue