import React from 'react'; import PropTypes from 'prop-types'; import moment from 'moment'; import { UserType } from './Types'; import Icon from './Icon'; import Avatar from './Avatar'; import { format } from '../utils/embed'; export default function Message(props) { const msg = props.data; const visitor = props.visitor; return (

= 0) }}>

{msg.photo &&

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