import React, { Component } from 'react' import PropTypes from 'prop-types' import { Link } from 'react-router' class UpperLeftUI extends Component { static propTypes = { currentUser: PropTypes.object, map: PropTypes.object, userRequested: PropTypes.bool, requestAnswered: PropTypes.bool, requestApproved: PropTypes.bool, onRequestClick: PropTypes.func } render () { const { map, currentUser, userRequested, requestAnswered, requestApproved, onRequestClick } = this.props return
{currentUser && METAMAPS} {!currentUser && METAMAPS}
{map && !map.authorizeToEdit(currentUser) &&
View Only
{currentUser && !userRequested &&
Request Access
} {userRequested && !requestAnswered &&
Request Pending
} {userRequested && requestAnswered && !requestApproved &&
Request Not Accepted
}
}
} } export default UpperLeftUI