import React, { Component } from 'react' import PropTypes from 'prop-types' import MapInfoBox from '../routes/MapView/MapInfoBox' class InfoAndHelp extends Component { static propTypes = { mapIsStarred: PropTypes.bool, currentUser: PropTypes.object, map: PropTypes.object, onHelpClick: PropTypes.func, onMapStar: PropTypes.func, onMapUnstar: PropTypes.func, onInfoClick: PropTypes.func, infoBoxhtml: PropTypes.string } render () { const { mapIsStarred, map, currentUser, onInfoClick, infoBoxHtml, onMapStar, onMapUnstar, onHelpClick } = this.props const starclassName = mapIsStarred ? 'starred' : '' const tooltip = mapIsStarred ? 'Unstar' : 'Star' const onStarClick = mapIsStarred ? onMapUnstar : onMapStar return