import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { injectIntl, FormattedMessage } from 'react-intl'; import { makeGetAccount } from '../../../selectors'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import Avatar from 'gabsocial/components/avatar'; import { shortNumberFormat } from 'gabsocial/utils/numbers'; import { acctFull } from 'gabsocial/utils/accounts'; class UserPanel extends ImmutablePureComponent { static propTypes = { account: ImmutablePropTypes.map, intl: PropTypes.object.isRequired, domain: PropTypes.string, } render() { const { account, intl, domain, autoPlayGif } = this.props; if (!account) return null; const displayNameHtml = { __html: account.get('display_name_html') }; const acct = account.get('acct').indexOf('@') === -1 && domain ? `${account.get('acct')}@${domain}` : account.get('acct'); return (