import React from 'react'; import PropTypes from 'prop-types'; import Slot from 'coral-framework/components/Slot'; import { Link } from 'react-router'; import { Icon } from 'coral-ui'; import CommentDetails from './CommentDetails'; import styles from './UserDetailComment.css'; import CommentFormatter from 'coral-admin/src/components/CommentFormatter'; import IfHasLink from 'coral-admin/src/components/IfHasLink'; import cn from 'classnames'; import CommentAnimatedEdit from './CommentAnimatedEdit'; import CommentLabels from '../containers/CommentLabels'; import ApproveButton from './ApproveButton'; import RejectButton from 'coral-admin/src/components/RejectButton'; import t, { timeago } from 'coral-framework/services/i18n'; class UserDetailComment extends React.Component { approve = () => this.props.comment.status === 'ACCEPTED' ? null : this.props.acceptComment({ commentId: this.props.comment.id }); reject = () => this.props.comment.status === 'REJECTED' ? null : this.props.rejectComment({ commentId: this.props.comment.id }); render() { const { comment, selected, toggleSelect, className, data, root: { settings }, } = this.props; const queryData = { root, comment }; const formatterSettings = { suspectWords: settings.wordlist.suspect, bannedWords: settings.wordlist.banned, body: comment.body, }; return (