wip: browse user
This commit is contained in:
@@ -20,7 +20,15 @@ export const User = memo(function User({
|
||||
}: {
|
||||
pubkey: string;
|
||||
time?: number;
|
||||
variant?: 'default' | 'simple' | 'mention' | 'repost' | 'chat' | 'large' | 'thread';
|
||||
variant?:
|
||||
| 'default'
|
||||
| 'simple'
|
||||
| 'mention'
|
||||
| 'repost'
|
||||
| 'chat'
|
||||
| 'large'
|
||||
| 'thread'
|
||||
| 'avatar';
|
||||
embedProfile?: string;
|
||||
}) {
|
||||
const { status, user } = useProfile(pubkey, embedProfile);
|
||||
@@ -125,6 +133,16 @@ export const User = memo(function User({
|
||||
);
|
||||
}
|
||||
|
||||
if (variant === 'avatar') {
|
||||
return (
|
||||
<Image
|
||||
src={user?.picture || user?.image}
|
||||
alt={pubkey}
|
||||
className="h-12 w-12 shrink-0 rounded-lg object-cover"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (variant === 'repost') {
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user