import React, { PureComponent } from 'react' import PropTypes from 'prop-types' import classnames from 'classnames' import Identicon from '../identicon' import { DEFAULT_ROUTE } from '../../routes' const NetworkIndicator = require('../network') export default class AppHeader extends PureComponent { static propTypes = { history: 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, hideNetworkIndicator: PropTypes.bool, disabled: 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, disabled } = this.props return isUnlocked && (