import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import moment from 'moment'; import { UserType, MessageType } 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: MessageType, children: PropTypes.node }; Tags.propTypes = { user: UserType.isRequired, data: PropTypes.array }