From bd8ae17dbc693367ff183d87fd3c64873c22a60f Mon Sep 17 00:00:00 2001 From: Vallari Agrawal Date: Sat, 14 Sep 2024 12:33:41 +0530 Subject: [PATCH] Fix login component to show user image Signed-off-by: Vallari Agrawal --- src/components/Login/index.jsx | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/components/Login/index.jsx b/src/components/Login/index.jsx index 1fcf82f..fe07671 100644 --- a/src/components/Login/index.jsx +++ b/src/components/Login/index.jsx @@ -5,19 +5,18 @@ import Menu from '@mui/material/Menu'; import MenuItem from '@mui/material/MenuItem'; import GitHubIcon from '@mui/icons-material/GitHub'; -import { doLogin, doLogout, useSession, useUserData } from "../../lib/teuthologyAPI"; +import { doLogin, doLogout, useSession } from "../../lib/teuthologyAPI"; export default function Login() { const sessionQuery = useSession(); - const userData = useUserData(); - const [anchorEl, setAnchorEl] = useState(null); - const open = Boolean(anchorEl); + const [dropMenuAnchor, setDropMenuAnchor] = useState(null); + const open = Boolean(dropMenuAnchor); const handleClick = (event) => { - setAnchorEl(event.currentTarget); + setDropMenuAnchor(event.currentTarget); }; const handleClose = () => { - setAnchorEl(null); + setDropMenuAnchor(null); }; if ( ! sessionQuery.isSuccess ) return null; @@ -27,26 +26,21 @@ export default function Login() { {sessionQuery.data?.session ?
Logout
: