/** * MobileMenu prints the menu content for authenticated user or * shows login actions for those who are not authenticated. */ import React, { PropTypes } from 'react'; import { FormattedMessage } from 'react-intl'; import { Avatar, InlineButton, NamedLink } from '../../components'; import css from './MobileMenu.css'; const MobileMenu = props => { const { isAuthenticated, currentUserHasListings, name, onLogout } = props; if (!isAuthenticated) { return (
); } const inboxLink = ( ); return (
{name}
{inboxLink}
); }; MobileMenu.defaultProps = { name: '' }; const { bool, func, string } = PropTypes; MobileMenu.propTypes = { isAuthenticated: bool.isRequired, currentUserHasListings: bool.isRequired, name: string, onLogout: func.isRequired, }; export default MobileMenu;