diff --git a/apps/studio/src/components/Content.tsx b/apps/studio/src/components/Content.tsx index cea67ccc6..1c147165f 100644 --- a/apps/studio/src/components/Content.tsx +++ b/apps/studio/src/components/Content.tsx @@ -6,7 +6,7 @@ import { Template } from './Template'; import { VisualiserTemplate } from './Visualiser'; import { debounce } from '../helpers'; -import { usePanelsState, useDocumentsState, useSettingsState } from '../state'; +import { usePanelsState, useDocumentsState } from '../state'; import type { FunctionComponent } from 'react'; @@ -15,8 +15,7 @@ interface ContentProps {} export const Content: FunctionComponent = () => { // eslint-disable-line sonarjs/cognitive-complexity const { show, secondaryPanelType } = usePanelsState(); const document = useDocumentsState(state => state.documents['asyncapi']?.document) || null; - const v3Enabled = useSettingsState(state => state.editor.v3support) || false; - const isV3 = document?.version() === '3.0.0' && v3Enabled; + const isV3 = document?.version() === '3.0.0'; const navigationEnabled = show.primarySidebar; const editorEnabled = show.primaryPanel; const viewEnabled = show.secondaryPanel; diff --git a/apps/studio/src/components/Modals/Settings/SettingsModal.tsx b/apps/studio/src/components/Modals/Settings/SettingsModal.tsx index 085fdc45e..8df9bd029 100644 --- a/apps/studio/src/components/Modals/Settings/SettingsModal.tsx +++ b/apps/studio/src/components/Modals/Settings/SettingsModal.tsx @@ -62,14 +62,12 @@ export const SettingsModal = create(({ activeTab = 'editor' const [governanceHints, setGovernanceHints] = useState(settings.governance.show.hints); const [autoRendering, setAutoRendering] = useState(settings.templates.autoRendering); const [confirmDisabled, setConfirmDisabled] = useState(true); - const [v3support, setV3support] = useState(settings.editor.v3support); const createNewState = (): SettingsState => { return { editor: { autoSaving, savingDelay, - v3support }, governance: { show: { @@ -88,7 +86,7 @@ export const SettingsModal = create(({ activeTab = 'editor' const newState = createNewState(); const isThisSameObjects = settingsSvc.isEqual(newState); setConfirmDisabled(isThisSameObjects); - }, [autoSaving, savingDelay, autoRendering, governanceWarnings, governanceInformations, governanceHints, v3support]); + }, [autoSaving, savingDelay, autoRendering, governanceWarnings, governanceInformations, governanceHints]); const onCancel = useCallback(() => { modal.hide(); @@ -131,20 +129,6 @@ export const SettingsModal = create(({ activeTab = 'editor' Save automatically after each change in the document or manually. -
-
- - setV3support(v)} - /> -
-