This commit is contained in:
hailin 2025-03-15 21:23:35 +08:00
parent 488ccdb94a
commit 46f4fc7087
1 changed files with 5 additions and 5 deletions

View File

@ -43,17 +43,17 @@ export function UserMenu({ user }: { user: UserData }) {
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
<DropdownMenu> <DropdownMenu>
<DropdownMenuTrigger asChild> <DropdownMenuTrigger asChild>
<Button className="p-0 m-0 w-7 h-7 bg-transparent border-none shadow-none outline-none hover:bg-transparent active:bg-transparent focus:ring-0 cursor-pointer"> <Button className="p-0 m-0 w-9 h-9 bg-transparent border-none shadow-none outline-none hover:bg-transparent active:bg-transparent focus:ring-0 cursor-pointer">
{user?.image ? ( {user?.image ? (
<Image <Image
className="h-12 w-12 select-none rounded-full ring-1 ring-zinc-100/10 transition-opacity duration-300 hover:opacity-80" className="h-9 w-9 select-none rounded-full ring-1 ring-zinc-100/10 transition-opacity duration-300 hover:opacity-80"
src={`${user.image}&s=60`} src={`${user.image}&s=60`}
alt='User profile image' alt='User profile image'
width={48} width={32}
height={48} height={32}
/> />
) : ( ) : (
<div className="flex h-12 w-12 shrink-0 select-none items-center justify-center rounded-full bg-muted/50 text-xs font-medium uppercase text-muted-foreground"> <div className="flex h-9 w-9 shrink-0 select-none items-center justify-center rounded-full bg-muted/50 text-xs font-medium uppercase text-muted-foreground">
{user?.user_name ? getUserInitials(user?.user_name.slice(0, 2)) : null} {user?.user_name ? getUserInitials(user?.user_name.slice(0, 2)) : null}
</div> </div>
)} )}