diff --git a/src/plugins/layout/InspectorSidebar.js b/src/plugins/layout/InspectorSidebar.js index 56f543544..4e1b39590 100644 --- a/src/plugins/layout/InspectorSidebar.js +++ b/src/plugins/layout/InspectorSidebar.js @@ -11,9 +11,7 @@ import type Client from '../../Client.js'; import type {Logger} from '../../fb-interfaces/Logger.js'; import { - GK, ManagedDataInspector, - Console, Panel, FlexCenter, styled, @@ -95,34 +93,7 @@ type Props = {| logger: Logger, |}; -type State = {| - isConsoleEnabled: boolean, -|}; - -export default class Sidebar extends Component { - state = { - isConsoleEnabled: false, - }; - - constructor(props: Props) { - super(props); - this.checkIfConsoleIsEnabled(); - } - - componentDidUpdate(prevProps: Props, prevState: State) { - if (prevProps.client !== this.props.client) { - this.checkIfConsoleIsEnabled(); - } - } - - checkIfConsoleIsEnabled() { - this.props.client - .call('isConsoleEnabled') - .then((result: {isEnabled: boolean}) => { - this.setState({isConsoleEnabled: result.isEnabled}); - }); - } - +export default class Sidebar extends Component { render() { const {element} = this.props; if (!element || !element.data) { @@ -181,13 +152,6 @@ export default class Sidebar extends Component { } } - if (GK.get('sonar_show_console_plugin') && this.state.isConsoleEnabled) { - sections.push( - - element.id} /> - , - ); - } return sections; } }