import React from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { getAcct, isVerified } from 'soapbox/utils/accounts'; import StillImage from 'soapbox/components/still_image'; import VerificationBadge from 'soapbox/components/verification_badge'; import { displayFqn } from 'soapbox/utils/state'; const mapStateToProps = state => ({ displayFqn: displayFqn(state), }); const ProfilePreview = ({ account, displayFqn }) => (
{account.get('username')} {account.get('display_name')} {isVerified(account) && } @{getAcct(account, displayFqn)}
); ProfilePreview.propTypes = { account: ImmutablePropTypes.map, displayFqn: PropTypes.bool, }; export default connect(mapStateToProps)(ProfilePreview);