import React from 'react'; import ImmutablePureComponent from 'react-immutable-pure-component'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import classNames from 'classnames'; import { makeGetAccount } from 'soapbox/selectors'; import Avatar from 'soapbox/components/avatar'; import DisplayName from 'soapbox/components/display_name'; import Permalink from 'soapbox/components/permalink'; import RelativeTimestamp from 'soapbox/components/relative_timestamp'; import { FormattedMessage, injectIntl } from 'react-intl'; import { getSettings } from 'soapbox/actions/settings'; import { shortNumberFormat } from 'soapbox/utils/numbers'; import ActionButton from 'soapbox/features/ui/components/action_button'; const makeMapStateToProps = () => { const getAccount = makeGetAccount(); const mapStateToProps = (state, { id }) => ({ account: getAccount(state, id), autoPlayGif: getSettings(state).get('autoPlayGif'), }); return mapStateToProps; }; export default @injectIntl @connect(makeMapStateToProps) class AccountCard extends ImmutablePureComponent { static propTypes = { account: ImmutablePropTypes.map.isRequired, autoPlayGif: PropTypes.bool, }; render() { const { account, autoPlayGif } = this.props; return (