feat: improve 🌸

This commit is contained in:
codytseng 2025-10-24 22:41:16 +08:00
parent 36c9796ea1
commit 1274942f64
7 changed files with 166 additions and 107 deletions

View file

@ -29,24 +29,22 @@ export default function Username({
}
if (!profile) return null
const { username, pubkey } = profile
return (
<HoverCard>
<HoverCardTrigger asChild>
<div className={className}>
<SecondaryPageLink
to={toProfile(pubkey)}
to={toProfile(userId)}
className="truncate hover:underline"
onClick={(e) => e.stopPropagation()}
>
{showAt && '@'}
{username}
{profile.username}
</SecondaryPageLink>
</div>
</HoverCardTrigger>
<HoverCardContent className="w-80">
<ProfileCard pubkey={pubkey} />
<ProfileCard userId={userId} />
</HoverCardContent>
</HoverCard>
)