Merge branch 'fix-profile-dropdown' into 'main'
Fix bug trying to switch accounts See merge request soapbox-pub/soapbox!2629
This commit is contained in:
commit
858a4ba5dd
1 changed files with 7 additions and 11 deletions
|
@ -179,6 +179,11 @@ const Account = ({
|
||||||
if (withDate) timestamp = account.created_at;
|
if (withDate) timestamp = account.created_at;
|
||||||
|
|
||||||
const LinkEl: any = withLinkToProfile ? Link : 'div';
|
const LinkEl: any = withLinkToProfile ? Link : 'div';
|
||||||
|
const linkProps = withLinkToProfile ? {
|
||||||
|
to: `/@${account.acct}`,
|
||||||
|
title: account.acct,
|
||||||
|
onClick: (event: React.MouseEvent) => event.stopPropagation(),
|
||||||
|
} : {};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div data-testid='account' className='group block w-full shrink-0' ref={overflowRef}>
|
<div data-testid='account' className='group block w-full shrink-0' ref={overflowRef}>
|
||||||
|
@ -188,12 +193,7 @@ const Account = ({
|
||||||
condition={showProfileHoverCard}
|
condition={showProfileHoverCard}
|
||||||
wrapper={(children) => <HoverRefWrapper className='relative' accountId={account.id} inline>{children}</HoverRefWrapper>}
|
wrapper={(children) => <HoverRefWrapper className='relative' accountId={account.id} inline>{children}</HoverRefWrapper>}
|
||||||
>
|
>
|
||||||
<LinkEl
|
<LinkEl className='rounded-full' {...linkProps}>
|
||||||
className='rounded-full'
|
|
||||||
to={`/@${account.acct}`}
|
|
||||||
title={account.acct}
|
|
||||||
onClick={(event: React.MouseEvent) => event.stopPropagation()}
|
|
||||||
>
|
|
||||||
<Avatar src={account.avatar} size={avatarSize} />
|
<Avatar src={account.avatar} size={avatarSize} />
|
||||||
{emoji && (
|
{emoji && (
|
||||||
<Emoji
|
<Emoji
|
||||||
|
@ -210,11 +210,7 @@ const Account = ({
|
||||||
condition={showProfileHoverCard}
|
condition={showProfileHoverCard}
|
||||||
wrapper={(children) => <HoverRefWrapper accountId={account.id} inline>{children}</HoverRefWrapper>}
|
wrapper={(children) => <HoverRefWrapper accountId={account.id} inline>{children}</HoverRefWrapper>}
|
||||||
>
|
>
|
||||||
<LinkEl
|
<LinkEl {...linkProps}>
|
||||||
to={`/@${account.acct}`}
|
|
||||||
title={account.acct}
|
|
||||||
onClick={(event: React.MouseEvent) => event.stopPropagation()}
|
|
||||||
>
|
|
||||||
<HStack space={1} alignItems='center' grow>
|
<HStack space={1} alignItems='center' grow>
|
||||||
<Text
|
<Text
|
||||||
size='sm'
|
size='sm'
|
||||||
|
|
Loading…
Reference in a new issue