import React, { Component, PropTypes } from 'react' import AccountMenu from './AccountMenu' import LoginForm from './LoginForm' import NotificationIcon from './NotificationIcon' class UpperRightUI extends Component { static propTypes = { currentUser: PropTypes.object, signInPage: PropTypes.bool, unreadNotificationsCount: PropTypes.number, openInviteLightbox: PropTypes.func } constructor(props) { super(props) this.state = {accountBoxOpen: false} } reset = () => { this.setState({accountBoxOpen: false}) } toggleAccountBox = () => { this.setState({accountBoxOpen: !this.state.accountBoxOpen}) } render () { const { currentUser, signInPage, unreadNotificationsCount, openInviteLightbox } = this.props const { accountBoxOpen } = this.state return
{currentUser &&
Create New Map
} {currentUser && } {!signInPage &&
Account
{currentUser && } {!currentUser && 'SIGN IN'} {!currentUser &&
}
{accountBoxOpen &&
{currentUser ? : }
}
}
} } export default UpperRightUI