Auth rework

This commit is contained in:
seb
2026-06-23 11:08:40 +02:00
parent 24f68c94f3
commit 09f53b5ac2
8 changed files with 27 additions and 34 deletions

View File

@@ -7,7 +7,7 @@ import MenuItem from '@mui/material/MenuItem';
import ListItemIcon from '@mui/material/ListItemIcon';
import ListItemText from '@mui/material/ListItemText';
import LogoutIcon from '@mui/icons-material/Logout';
import { useAuth } from '../auth/AuthContext';
import { useAuth } from '../auth/useAuth';
// Menu open/close state is local; toggling it only re-renders this component.
export default function UserMenu() {
@@ -22,7 +22,7 @@ export default function UserMenu() {
onClick={(e) => setAnchorEl(e.currentTarget)}
sx={{ p: 0, width: 32, height: 32, borderRadius: '50%' }}
>
<Avatar alt={user?.email} sx={{ width: 32, height: 32 }}>
<Avatar src={user?.picture} alt={user?.email} sx={{ width: 32, height: 32 }}>
{user?.email?.[0]?.toUpperCase()}
</Avatar>
</IconButton>