import React from 'react' import PropTypes from 'prop-types' import { NavLink } from 'react-router-dom' import { defineMessages, injectIntl } from 'react-intl' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import { me } from '../initial_state' import Button from './button' import DisplayName from './display_name' import DotTextSeperator from './dot_text_seperator' import Icon from './icon' import RelativeTimestamp from './relative_timestamp' import Text from './text' class CommentHeader extends ImmutablePureComponent { openLikesList = () => { this.props.onOpenLikes(this.props.status) } openRepostsList = () => { this.props.onOpenReposts(this.props.status) } openRevisions = () => { this.props.onOpenRevisions(this.props.status) } render() { const { intl, status, ancestorAccountId, } = this.props if (!status) return null const repostCount = status.get('reblogs_count') const favoriteCount = status.get('favourites_count') const statusUrl = `/${status.getIn(['account', 'acct'])}/posts/${status.get('id')}`; const isOwner = ancestorAccountId === status.getIn(['account', 'id']) const myComment = status.getIn(['account', 'id']) === me return (