Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { name, isUnderConstruction } = sidePanelItems[selectedPane];
let displayName;
if (name === "Firefox") {
displayName = "Firefox Nightly";
}
const isConnected =
name === sidePanelItems.Firefox.name
? this.state.firefoxConnected
: this.state.chromeConnected;
const isNodeSelected = name === sidePanelItems.Node.name;
if (isNodeSelected) {
return dom.div(
{ className: "launch-action-container" },
dom.h3({}, "Run a node script in the terminal with `--inspect`"),
isUnderConstruction ? this.renderExperimentalMessage(name) : null
);
}
const connectedStateText = isNodeSelected
? null
: `Please open a tab in ${displayName || name}`;
return isConnected
? connectedStateText
: this.renderLaunchButton(name, isUnderConstruction);
}
render() {
const { config } = this.props;
return dom.div(
{ className: "launchpad-tabs" },
dom.h3({}, "Configurations"),
this.renderConfig(config),
config.features ?
(
dom.h3({}, "Features"),
this.renderFeatures(config.features)
) : null
);
}
}
render() {
const { config } = this.props;
return dom.div(
{ className: "launchpad-tabs" },
dom.h3({}, "Configurations"),
this.renderConfig(config),
config.features ?
(
dom.h3({}, "Features"),
this.renderFeatures(config.features)
) : null
);
}
}