import React from 'react' import PropTypes from 'prop-types' import { NavLink } from 'react-router-dom' import { injectIntl, defineMessages, FormattedMessage } from 'react-intl' import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import Icon from './icon' import Text from './text' class StatusPrepend extends ImmutablePureComponent { render() { const { intl, status, isFeatured, isPromoted, isComment, isPinnedInGroup, onOpenProModal, } = this.props if (!status) return null const isRepost = (status.get('reblog', null) !== null && typeof status.get('reblog') === 'object') const showRepostedComment = !!status.getIn(['reblog', 'in_reply_to_account_id'], null) && isRepost const reblogUrl = status.getIn(['reblog', 'url'], null) if (!isFeatured && !isPinnedInGroup && !isPromoted && !isRepost && !isComment) return null let iconId if (isFeatured || isPinnedInGroup) iconId = 'pin' else if (isPromoted) iconId = 'star' else if (isRepost) iconId = 'repost' else if (isComment) iconId = 'comment' return (