fix: pass raw avatar filename to preview card Avatar instead of pre-resolved URL
This commit is contained in:
@@ -226,26 +226,15 @@ export function AccountPanel() {
|
|||||||
/>
|
/>
|
||||||
{/* Avatar + info */}
|
{/* Avatar + info */}
|
||||||
<div className="px-4 pb-3">
|
<div className="px-4 pb-3">
|
||||||
<div
|
|
||||||
className="mt-[-28px] mb-2 w-fit rounded-full"
|
|
||||||
style={{ border: '4px solid var(--color-surface-channel, #1e1e2a)' }}
|
|
||||||
>
|
|
||||||
{displayAvatarSrc ? (
|
|
||||||
<img
|
|
||||||
src={displayAvatarSrc}
|
|
||||||
alt="Avatar"
|
|
||||||
className="w-[56px] h-[56px] rounded-full object-cover"
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<Avatar
|
<Avatar
|
||||||
src={null}
|
src={avatarPreview ?? (avatarFilename === '' ? null : user.avatar)}
|
||||||
name={effectiveDisplayName}
|
name={effectiveDisplayName}
|
||||||
size={56}
|
size={56}
|
||||||
userId={user.homeUserId ?? user.id}
|
userId={user.homeUserId ?? user.id}
|
||||||
user={{ ...user, avatarColor: effectiveAvatarColor } as User}
|
user={{ ...user, avatarColor: effectiveAvatarColor } as User}
|
||||||
|
ring={{ width: 4, color: 'var(--color-surface-channel, #1e1e2a)' }}
|
||||||
|
className="mt-[-32px] mb-2"
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div
|
<div
|
||||||
className="font-semibold text-[15px] leading-tight text-txt-primary"
|
className="font-semibold text-[15px] leading-tight text-txt-primary"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user