diff --git a/services/web/frontend/js/features/source-editor/components/editor-switch-legacy.tsx b/services/web/frontend/js/features/source-editor/components/editor-switch-legacy.tsx index 8bb95d53df..f168902d01 100644 --- a/services/web/frontend/js/features/source-editor/components/editor-switch-legacy.tsx +++ b/services/web/frontend/js/features/source-editor/components/editor-switch-legacy.tsx @@ -3,9 +3,9 @@ import useScopeValue from '../../../shared/hooks/use-scope-value' import Tooltip from '../../../shared/components/tooltip' import { sendMB } from '../../../infrastructure/event-tracking' import getMeta from '../../../utils/meta' -import SplitTestBadge from '../../../shared/components/split-test-badge' import isValidTeXFile from '../../../main/is-valid-tex-file' import { useTranslation } from 'react-i18next' +import SplitTestBadge from '../../../shared/components/split-test-badge' function Badge() { const content = ( @@ -41,23 +41,13 @@ function Badge() { } const showLegacySourceEditor: boolean = getMeta('ol-showLegacySourceEditor') -const visualEditorNameVariant: string = getMeta('ol-visualEditorNameVariant') -const isParticipatingInVisualEditorNamingTest: boolean = getMeta( - 'ol-isParticipatingInVisualEditorNamingTest' -) function EditorSwitch() { + const { t } = useTranslation() const [newSourceEditor, setNewSourceEditor] = useScopeValue( 'editor.newSourceEditor' ) const [richText, setRichText] = useScopeValue('editor.showRichText') - const sourceName = - visualEditorNameVariant === 'code-visual' - ? 'Code Editor' - : visualEditorNameVariant === 'source-visual' - ? 'Source Editor' - : 'Source' - const [visual, setVisual] = useScopeValue('editor.showVisual') const [docName] = useScopeValue('editor.open_doc_name') @@ -116,7 +106,7 @@ function EditorSwitch() { onChange={handleChange} /> {showLegacySourceEditor ? ( @@ -143,7 +133,7 @@ function EditorSwitch() { /> - {!!richTextOrVisual && !isParticipatingInVisualEditorNamingTest && ( + {!!richTextOrVisual && ( )} @@ -157,9 +147,6 @@ const RichTextToggle: FC<{ }> = ({ checked, disabled, handleChange }) => { const { t } = useTranslation() - const richTextName = - visualEditorNameVariant === 'default' ? 'Rich Text' : 'Visual Editor' - const toggle = ( )