Fix avatar size in profile hover card
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
994d9ebd35
commit
6208ea8e43
1 changed files with 13 additions and 13 deletions
|
@ -26,10 +26,10 @@ const UserPanel: React.FC<IUserPanel> = ({ accountId, action, badges, domain })
|
||||||
const fqn = useAppSelector((state) => displayFqn(state));
|
const fqn = useAppSelector((state) => displayFqn(state));
|
||||||
|
|
||||||
if (!account) return null;
|
if (!account) return null;
|
||||||
const displayNameHtml = { __html: account.get('display_name_html') };
|
const displayNameHtml = { __html: account.display_name_html };
|
||||||
const acct = !account.get('acct').includes('@') && domain ? `${account.get('acct')}@${domain}` : account.get('acct');
|
const acct = !account.acct.includes('@') && domain ? `${account.acct}@${domain}` : account.acct;
|
||||||
const header = account.get('header');
|
const header = account.header;
|
||||||
const verified = account.get('verified');
|
const verified = account.verified;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='relative'>
|
<div className='relative'>
|
||||||
|
@ -43,11 +43,11 @@ const UserPanel: React.FC<IUserPanel> = ({ accountId, action, badges, domain })
|
||||||
|
|
||||||
<HStack justifyContent='between'>
|
<HStack justifyContent='between'>
|
||||||
<Link
|
<Link
|
||||||
to={`/@${account.get('acct')}`}
|
to={`/@${account.acct}`}
|
||||||
title={acct}
|
title={acct}
|
||||||
className='-mt-12 block'
|
className='-mt-12 block'
|
||||||
>
|
>
|
||||||
<Avatar src={account.avatar} className='h-20 w-20 bg-gray-50 ring-2 ring-white overflow-hidden' />
|
<Avatar src={account.avatar} size={80} className='h-20 w-20 bg-gray-50 ring-2 ring-white overflow-hidden' />
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
{action && (
|
{action && (
|
||||||
|
@ -57,7 +57,7 @@ const UserPanel: React.FC<IUserPanel> = ({ accountId, action, badges, domain })
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack>
|
<Stack>
|
||||||
<Link to={`/@${account.get('acct')}`}>
|
<Link to={`/@${account.acct}`}>
|
||||||
<HStack space={1} alignItems='center'>
|
<HStack space={1} alignItems='center'>
|
||||||
<Text size='lg' weight='bold' dangerouslySetInnerHTML={displayNameHtml} />
|
<Text size='lg' weight='bold' dangerouslySetInnerHTML={displayNameHtml} />
|
||||||
|
|
||||||
|
@ -77,11 +77,11 @@ const UserPanel: React.FC<IUserPanel> = ({ accountId, action, badges, domain })
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<HStack alignItems='center' space={3}>
|
<HStack alignItems='center' space={3}>
|
||||||
{account.get('followers_count') >= 0 && (
|
{account.followers_count >= 0 && (
|
||||||
<Link to={`/@${account.get('acct')}/followers`} title={intl.formatNumber(account.get('followers_count'))}>
|
<Link to={`/@${account.acct}/followers`} title={intl.formatNumber(account.followers_count)}>
|
||||||
<HStack alignItems='center' space={1}>
|
<HStack alignItems='center' space={1}>
|
||||||
<Text theme='primary' weight='bold' size='sm'>
|
<Text theme='primary' weight='bold' size='sm'>
|
||||||
{shortNumberFormat(account.get('followers_count'))}
|
{shortNumberFormat(account.followers_count)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text weight='bold' size='sm'>
|
<Text weight='bold' size='sm'>
|
||||||
<FormattedMessage id='account.followers' defaultMessage='Followers' />
|
<FormattedMessage id='account.followers' defaultMessage='Followers' />
|
||||||
|
@ -90,11 +90,11 @@ const UserPanel: React.FC<IUserPanel> = ({ accountId, action, badges, domain })
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{account.get('following_count') >= 0 && (
|
{account.following_count >= 0 && (
|
||||||
<Link to={`/@${account.get('acct')}/following`} title={intl.formatNumber(account.get('following_count'))}>
|
<Link to={`/@${account.acct}/following`} title={intl.formatNumber(account.following_count)}>
|
||||||
<HStack alignItems='center' space={1}>
|
<HStack alignItems='center' space={1}>
|
||||||
<Text theme='primary' weight='bold' size='sm'>
|
<Text theme='primary' weight='bold' size='sm'>
|
||||||
{shortNumberFormat(account.get('following_count'))}
|
{shortNumberFormat(account.following_count)}
|
||||||
</Text>
|
</Text>
|
||||||
<Text weight='bold' size='sm'>
|
<Text weight='bold' size='sm'>
|
||||||
<FormattedMessage id='account.follows' defaultMessage='Follows' />
|
<FormattedMessage id='account.follows' defaultMessage='Follows' />
|
||||||
|
|
Loading…
Reference in a new issue