import React from 'react'; import PropTypes from 'prop-types'; import Linkify from 'react-linkify'; const name = 'talk-plugin-comment-content'; const CommentContent = ({ comment }) => { const textbreaks = comment.body.split('\n'); return ( {textbreaks.map((line, i) => { return ( {line.trim()} {i !== textbreaks.length - 1 && (
)}
); })}
); }; CommentContent.propTypes = { comment: PropTypes.object.isRequired, }; export default CommentContent;