From 8459e8dda1c54f9d640eb10a54872fd618d6316c Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Wed, 1 Apr 2020 17:11:42 -0230 Subject: [PATCH] Don't render the ConnectedStatusIndicator outside of the popup (#8275) --- .../connected-status-indicator.component.js | 7 +------ ui/app/components/app/menu-bar/menu-bar.component.js | 8 +++++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ui/app/components/app/connected-status-indicator/connected-status-indicator.component.js b/ui/app/components/app/connected-status-indicator/connected-status-indicator.component.js index 079a42052..96f391ef8 100644 --- a/ui/app/components/app/connected-status-indicator/connected-status-indicator.component.js +++ b/ui/app/components/app/connected-status-indicator/connected-status-indicator.component.js @@ -1,8 +1,6 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' -import { ENVIRONMENT_TYPE_POPUP } from '../../../../../app/scripts/lib/enums' -import { getEnvironmentType } from '../../../../../app/scripts/lib/util' import { STATUS_CONNECTED, STATUS_CONNECTED_TO_ANOTHER_ACCOUNT, @@ -50,10 +48,7 @@ export default class ConnectedStatusIndicator extends Component { render () { return ( -
+
{ this.renderStatusCircle() } { this.renderStatusText() }
diff --git a/ui/app/components/app/menu-bar/menu-bar.component.js b/ui/app/components/app/menu-bar/menu-bar.component.js index 576f9d794..c2a1ae581 100644 --- a/ui/app/components/app/menu-bar/menu-bar.component.js +++ b/ui/app/components/app/menu-bar/menu-bar.component.js @@ -4,6 +4,8 @@ import Tooltip from '../../ui/tooltip' import SelectedAccount from '../selected-account' import ConnectedStatusIndicator from '../connected-status-indicator' import AccountDetailsDropdown from '../dropdowns/account-details-dropdown' +import { getEnvironmentType } from '../../../../../app/scripts/lib/util' +import { ENVIRONMENT_TYPE_POPUP } from '../../../../../app/scripts/lib/enums' export default class MenuBar extends PureComponent { static contextTypes = { @@ -19,7 +21,11 @@ export default class MenuBar extends PureComponent { return (
- + { + getEnvironmentType() === ENVIRONMENT_TYPE_POPUP + ? + : null + }