// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. import React, {FC} from 'react' import {injectIntl, IntlShape} from 'react-intl' import {IBlock} from '../blocks/block' import mutator from '../mutator' import {Utils} from '../utils' import IconButton from '../widgets/buttons/iconButton' import DeleteIcon from '../widgets/icons/delete' import OptionsIcon from '../widgets/icons/options' import Menu from '../widgets/menu' import MenuWrapper from '../widgets/menuWrapper' import './comment.scss' type Props = { comment: IBlock username: string userImageUrl: string intl: IntlShape } const Comment: FC = (props: Props) => { const {comment, username, userImageUrl, intl} = props const html = Utils.htmlFromMarkdown(comment.title) return (
{username}
{(new Date(comment.createAt)).toLocaleTimeString()}
}/> } id='delete' name={intl.formatMessage({id: 'Comment.delete', defaultMessage: 'Delete'})} onClick={() => mutator.deleteBlock(comment)} />
) } export default injectIntl(Comment)