import ImmutablePropTypes from 'react-immutable-proptypes' import ImmutablePureComponent from 'react-immutable-pure-component' import { NavLink } from 'react-router-dom' import { FormattedMessage } from 'react-intl' import { makeGetAccount } from '../../selectors' import { shortNumberFormat } from '../../utils/numbers' import { me } from '../../initial_state' import PopoverLayout from './popover_layout' import AccountActionButton from '../account_action_button' import Avatar from '../avatar' import DisplayName from '../display_name' import Text from '../text' const mapStateToProps = (state, props) => ({ account: makeGetAccount()(state, props.accountId), }) export default @connect(mapStateToProps) class UserInfoPopover extends ImmutablePureComponent { static propTypes = { account: ImmutablePropTypes.map, accountId: PropTypes.string.isRequired, isXS: PropTypes.bool, } render() { const { account, isXS } = this.props if (isXS || !me) return null const content = !account ? null : { __html: account.get('note_emojified') } const to = !account ? '' : `/${account.get('acct')}` return (
{shortNumberFormat(account.get('followers_count'))}  {shortNumberFormat(account.get('following_count'))} 
) } }