mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 08:31:12 -05:00
Update user avatar component to use a new component for consistency
Replaced Avatar component with UserAvatar component in AuthButtons.tsx for improved avatar display consistency and reliability, referencing commit b91d798. Replit-Commit-Author: Agent Replit-Commit-Session-Id: edf9a2eb-860d-4c14-b250-aaeaf2c80ee3 Replit-Commit-Checkpoint-Type: intermediate_checkpoint
This commit is contained in:
4
.replit
4
.replit
@@ -41,3 +41,7 @@ externalPort = 3000
|
||||
[[ports]]
|
||||
localPort = 37143
|
||||
externalPort = 3001
|
||||
|
||||
[[ports]]
|
||||
localPort = 37623
|
||||
externalPort = 3002
|
||||
|
||||
@@ -71,27 +71,12 @@ export function AuthButtons() {
|
||||
return <DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="ghost" className="relative h-8 w-8 rounded-full">
|
||||
<<<<<<< HEAD
|
||||
<Avatar className="h-8 w-8" key={profile?.avatar_url || 'fallback'}>
|
||||
<AvatarImage
|
||||
src={profile?.avatar_url || undefined}
|
||||
alt={profile?.display_name || profile?.username || user.email || 'User avatar'}
|
||||
onError={(e) => {
|
||||
e.currentTarget.src = ''; // Force fallback
|
||||
}}
|
||||
/>
|
||||
<AvatarFallback className="bg-primary/10 text-primary font-medium">
|
||||
{(profile?.display_name || profile?.username || user.email || 'U').charAt(0).toUpperCase()}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
=======
|
||||
<UserAvatar
|
||||
key={profile?.avatar_url || 'no-avatar'}
|
||||
avatarUrl={profile?.avatar_url}
|
||||
fallbackText={profile?.display_name || profile?.username || user.email || 'U'}
|
||||
size="sm"
|
||||
/>
|
||||
>>>>>>> b91d798 (Improve user avatar display to ensure consistency and reliability)
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent className="w-56" align="end" forceMount>
|
||||
|
||||
Reference in New Issue
Block a user