import React, { Fragment } from 'react'; import { NavLink } from 'react-router-dom'; import PropTypes from 'prop-types'; import Tooltip from '../../components/tooltip'; const LikeDataEntry: React.FunctionComponent = (props) => { // TODO: remove any const data_string = JSON.stringify({like: true}); return (
Number of likes
Copy
{ (props.value != null)? (props.value === 1)? `${props.value} person likes this building` : `${props.value} people like this building` : '\u00A0' }
{ (props.user_building_like)?
…including you!
: '' }
); } LikeDataEntry.propTypes = { value: PropTypes.any, user_building_like: PropTypes.bool } export default LikeDataEntry;