Skip to content

Commit f3468d4

Browse files
committed
Update AvatarDropdown.tsx
1 parent 23d253e commit f3468d4

File tree

1 file changed

+13
-41
lines changed

1 file changed

+13
-41
lines changed

app/components/@settings/core/AvatarDropdown.tsx

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -21,52 +21,24 @@ export const AvatarDropdown = ({ onSelectTab }: AvatarDropdownProps) => {
2121
return (
2222
<DropdownMenu.Root>
2323
<DropdownMenu.Trigger asChild>
24-
<motion.button className="group outline-none relative" whileHover={{ scale: 1.02 }} whileTap={{ scale: 0.98 }}>
24+
<motion.button
25+
className="w-10 h-10 rounded-full bg-transparent flex items-center justify-center focus:outline-none"
26+
whileHover={{ scale: 1.02 }}
27+
whileTap={{ scale: 0.98 }}
28+
>
2529
{profile?.avatar ? (
26-
<div
27-
className={classNames(
28-
'w-10 h-10',
29-
'rounded-full overflow-hidden',
30-
'bg-white dark:bg-gray-800',
31-
'transition-all duration-200',
32-
'relative',
33-
'shadow-sm',
34-
)}
35-
>
36-
<img
37-
src={profile.avatar}
38-
alt={profile?.username || 'Profile'}
39-
className={classNames(
40-
'w-full h-full',
41-
'object-cover',
42-
'transform-gpu',
43-
'image-rendering-crisp',
44-
'group-hover:brightness-110',
45-
'group-hover:scale-105',
46-
'transition-all duration-200',
47-
)}
48-
loading="eager"
49-
decoding="sync"
50-
/>
51-
</div>
30+
<img
31+
src={profile.avatar}
32+
alt={profile?.username || 'Profile'}
33+
className="w-full h-full rounded-full object-cover"
34+
loading="eager"
35+
decoding="sync"
36+
/>
5237
) : (
53-
<div
54-
className={classNames(
55-
'w-10 h-10',
56-
'rounded-full',
57-
'flex items-center justify-center',
58-
'bg-white dark:bg-gray-800',
59-
'text-gray-400 dark:text-gray-500',
60-
'group-hover:text-purple-500 dark:group-hover:text-purple-400',
61-
'transition-all duration-200',
62-
'shadow-sm',
63-
)}
64-
>
38+
<div className="w-full h-full rounded-full flex items-center justify-center bg-white dark:bg-gray-800 text-gray-400 dark:text-gray-500">
6539
<div className="i-ph:question w-6 h-6" />
6640
</div>
6741
)}
68-
{/* Add subtle circular highlight effect */}
69-
<div className="absolute inset-0 rounded-full bg-gradient-to-b from-white/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity" />
7042
</motion.button>
7143
</DropdownMenu.Trigger>
7244

0 commit comments

Comments
 (0)