bigbuffet-rw/app/soapbox/features/edit_profile/components/profile_preview.js

32 lines
981 B
JavaScript
Raw Normal View History

2020-04-22 14:26:44 -07:00
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
2020-05-28 15:52:07 -07:00
import { acctFull } from 'soapbox/utils/accounts';
2020-04-22 14:26:44 -07:00
const ProfilePreview = ({ account }) => (
<div className='card h-card'>
<a target='_blank' rel='noopener' href={account.get('url')}>
<div className='card__img'>
<img alt='' src={account.get('header')} />
</div>
<div className='card__bar'>
<div className='avatar'>
<img alt='' className='u-photo' src={account.get('avatar')} width='48' height='48' />
</div>
<div className='display-name'>
<span style={{ display: 'none' }}>{account.get('username')}</span>
<bdi>
<strong className='emojify p-name'>{account.get('display_name')}</strong>
</bdi>
<span>{acctFull(account)}</span>
</div>
</div>
</a>
</div>
);
ProfilePreview.propTypes = {
account: ImmutablePropTypes.map,
};
export default ProfilePreview;