import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl } from 'react-intl'; import { NavLink } from 'react-router-dom'; import Avatar from '../../../../components/avatar'; import Button from '../../../../components/button'; import DisplayName from '../../../../components/display_name'; import { isRtl } from '../../../../utils/rtl'; const messages = defineMessages({ cancel: { id: 'reply_indicator.cancel', defaultMessage: 'Cancel' }, }); export default @injectIntl class ReplyIndicator extends ImmutablePureComponent { static contextTypes = { router: PropTypes.object, }; static propTypes = { status: ImmutablePropTypes.map, onCancel: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, }; handleClick = () => { this.props.onCancel(); } render () { const { status, intl } = this.props; if (!status) { return null; } const content = { __html: status.get('contentHtml') }; const style = { direction: isRtl(status.get('search_index')) ? 'rtl' : 'ltr', }; return (