import React from 'react'; import PropTypes from 'prop-types'; import ReactMarkdown from 'react-markdown'; import moment from 'moment'; import Icon from './Icon'; export default function Message(props) { const msg = props.data; const visitor = props.visitor; return (
{`${msg.user.uname}`}
{msg.photo &&

}
); } function Tags(props) { return props.data && props.data.map(tag => { return ({tag}) }) } Tags.propTypes = { data: PropTypes.array } Message.propTypes = { data: PropTypes.shape({ mid: PropTypes.number.isRequired, user: PropTypes.shape({ uid: PropTypes.number.isRequired, uname: PropTypes.string.isRequired }), timestamp: PropTypes.string.isRequired, body: PropTypes.string }) };