import React from 'react'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Hashtag from 'flavours/glitch/components/hashtag'; const messages = defineMessages({ lastStatusAt: { id: 'account.featured_tags.last_status_at', defaultMessage: 'Last post on {date}' }, empty: { id: 'account.featured_tags.last_status_never', defaultMessage: 'No posts' }, }); export default @injectIntl class FeaturedTags extends ImmutablePureComponent { static contextTypes = { router: PropTypes.object, }; static propTypes = { account: ImmutablePropTypes.map, featuredTags: ImmutablePropTypes.list, tagged: PropTypes.string, intl: PropTypes.object.isRequired, }; render () { const { account, featuredTags, intl } = this.props; if (!account || account.get('suspended') || featuredTags.isEmpty()) { return null; } return (