import React, { Component } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' const { ENVIRONMENT_TYPE_NOTIFICATION } = require('../../../../app/scripts/lib/enums') const { DEFAULT_ROUTE, CONFIRM_TRANSACTION_ROUTE } = require('../../routes') const Identicon = require('../identicon') const NetworkIndicator = require('../network') class AppHeader extends Component { static propTypes = { history: PropTypes.object, location: PropTypes.object, network: PropTypes.string, provider: PropTypes.object, networkDropdownOpen: PropTypes.bool, showNetworkDropdown: PropTypes.func, hideNetworkDropdown: PropTypes.func, toggleAccountMenu: PropTypes.func, selectedAddress: PropTypes.string, isUnlocked: PropTypes.bool, } static contextTypes = { t: PropTypes.func, } handleNetworkIndicatorClick (event) { event.preventDefault() event.stopPropagation() const { networkDropdownOpen, showNetworkDropdown, hideNetworkDropdown } = this.props return networkDropdownOpen === false ? showNetworkDropdown() : hideNetworkDropdown() } renderAccountMenu () { const { isUnlocked, toggleAccountMenu, selectedAddress } = this.props return isUnlocked && (