From 1d6399c1b5822de622814756a261cb3eee49b45c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=BCchele?= Date: Fri, 24 May 2019 03:25:47 -0700 Subject: [PATCH] remove console from layout inspector Summary: We removed the console already from the client side. So this causes all calls to isConsoleEnabled to fail. This diffs removes these calls. Reviewed By: passy Differential Revision: D15449571 fbshipit-source-id: b702a8fbc80af002e1d8b7d37d5acc664ea5be99 --- src/plugins/layout/InspectorSidebar.js | 38 +------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) 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; } }