update thread widget

This commit is contained in:
2023-10-19 14:45:41 +07:00
parent 0de72eb009
commit e1e54c1a98
14 changed files with 144 additions and 206 deletions

View File

@@ -32,6 +32,7 @@ export const User = memo(function User({
| 'chat'
| 'large'
| 'thread'
| 'miniavatar'
| 'avatar'
| 'stacked'
| 'ministacked';
@@ -207,6 +208,28 @@ export const User = memo(function User({
);
}
if (variant === 'miniavatar') {
return (
<Avatar.Root>
<Avatar.Image
src={user?.picture || user?.image}
alt={pubkey}
loading="lazy"
decoding="async"
style={{ contentVisibility: 'auto' }}
className="h-10 w-10 rounded-lg"
/>
<Avatar.Fallback delayMs={300}>
<img
src={svgURI}
alt={pubkey}
className="h-10 w-10 rounded-lg bg-black dark:bg-white"
/>
</Avatar.Fallback>
</Avatar.Root>
);
}
if (variant === 'stacked') {
return (
<Avatar.Root>