import './account-block.css';
import emojifyText from '../utils/emojify-text';
import states from '../utils/states';
import Avatar from './avatar';
function AccountBlock({
skeleton,
account,
avatarSize = 'xl',
instance,
external,
onClick,
}) {
if (skeleton) {
return (
);
}
const { acct, avatar, avatarStatic, displayName, username, emojis, url } =
account;
const displayNameWithEmoji = emojifyText(displayName, emojis);
return (
{
if (external) return;
e.preventDefault();
if (onClick) return onClick(e);
states.showAccount = {
account,
instance,
};
}}
>
{displayName ? (
) : (
{username}
)}
@{acct}
);
}
export default AccountBlock;