Auth rework
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user