import React from 'react' import PropTypes from 'prop-types' import { connect } from 'react-redux' import { defineMessages, injectIntl } from 'react-intl' import { closePopover } from '../../actions/popover' import { meUsername } from '../../initial_state' import PopoverLayout from './popover_layout' import List from '../list' const messages = defineMessages({ profile: { id: 'account.profile', defaultMessage: 'Profile' }, display: { id: 'display_options', defaultMessage: 'Display Options' }, help: { id: 'getting_started.help', defaultMessage: 'Help' }, settings: { id: 'settings', defaultMessage: 'Settings' }, logout: { 'id': 'confirmations.logout.confirm', 'defaultMessage': 'Log out' }, }) const mapDispatchToProps = (dispatch) => ({ onClosePopover() { dispatch(closePopover()) }, }) export default @injectIntl @connect(null, mapDispatchToProps) class NavSettingsPopover extends React.PureComponent { static propTypes = { intl: PropTypes.object.isRequired, onClosePopover: PropTypes.func.isRequired, isXS: PropTypes.bool, } handleOnClosePopover = () => { this.props.onClosePopover() } render() { const { intl, isXS } = this.props if (isXS) return null return ( ) } }