message: Remove duplication of dropdown items
diff: @@ -143,6 +143,23 @@ class MastheadToolbar_ extends React.Component {
  window.open(openshiftHelpBase, '_blank').opener = null;
  }
  + _launchActions() {
  + return [{
  + label: 'Multi-Cluster Manager',
  + callback: this._onClusterManager,
  + }];
  + }
  +
  + _helpActions() {
  + return [{
  + label: 'Documentation',
  + callback: this._onDocumentation,
  + },{
  + label: 'About',
  + callback: this._onAboutModal,
  + }];
  + }
  +
  _renderMenuItems(actions) {
  return actions.map((action, i) => action.separator
  ? <DropdownSeparator key={i} />
  @@ -153,6 +170,8 @@ class MastheadToolbar_ extends React.Component {
  _renderMenu(mobile) {
  const { flags } = this.props;
  const { isUserDropdownOpen, isKebabDropdownOpen, username } = this.state;
  + const helpActions = this._helpActions();
  + const launchActions = this._launchActions();
  if (flagPending(flags[FLAGS.OPENSHIFT]) || flagPending(flags[FLAGS.AUTH_ENABLED]) || !username) {
  return null;
  @@ -182,21 +201,10 @@ class MastheadToolbar_ extends React.Component {
  }
  if (mobile) {
  - actions.unshift({
  - label: 'Documentation',
  - callback: this._onDocumentation,
  - },{
  - label: 'About',
  - callback: this._onAboutModal,
  - });
  + actions.unshift(...helpActions);
  if (flags[FLAGS.OPENSHIFT]) {
  - actions.unshift({
  - label: 'Multi-Cluster Manager',
  - callback: this._onClusterManager,
  - },{
  - separator: true,
  - });
  + actions.unshift(...launchActions, {separator: true});
  }
  return (
  @@ -256,11 +264,7 @@ class MastheadToolbar_ extends React.Component {
  </DropdownToggle>
  }
  isOpen={isApplicationLauncherDropdownOpen}
  - dropdownItems={[
  - <DropdownItem key="clustermanager" onClick={this._onClusterManager}>
  - Multi-Cluster Manager
  - </DropdownItem>,
  - ]}
  + dropdownItems={this._renderMenuItems(this._launchActions())}
  />
  </ToolbarItem>}
  <ToolbarItem>
  @@ -273,14 +277,7 @@ class MastheadToolbar_ extends React.Component {
  </DropdownToggle>
  }
  isOpen={isHelpDropdownOpen}
  - dropdownItems={[
  - <DropdownItem key="documentation" onClick={this._onDocumentation}>
  - Documentation
  - </DropdownItem>,
  - <DropdownItem key="about" onClick={this._onAboutModal}>
  - About
  - </DropdownItem>,
  - ]}
  + dropdownItems={this._renderMenuItems(this._helpActions())}
  />
  </ToolbarItem>
  </ToolbarGroup>
  