diff --git a/src/App.jsx b/src/App.jsx index 01a2f3b..8629b9b 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -8,7 +8,7 @@ import { GoogleOAuthProvider } from "@react-oauth/google"; function App() { return ( <> - + ; diff --git a/src/components/Navbar.jsx b/src/components/Navbar.jsx index eb2891f..c7ea3e7 100644 --- a/src/components/Navbar.jsx +++ b/src/components/Navbar.jsx @@ -13,23 +13,28 @@ import Tooltip from "@mui/material/Tooltip"; import MenuItem from "@mui/material/MenuItem"; import AdbIcon from "@mui/icons-material/Adb"; import turtleLogo from "/turtle.png"; +import { googleLogout } from "@react-oauth/google"; const settings = ["Logout"]; const Navbar = (props) => { const [anchorElUser, setAnchorElUser] = React.useState(null); - const handleOpenUserMenu = (event) => { setAnchorElUser(event.currentTarget); }; - console.log("User", props.user) + console.log("User", props.user); const handleCloseUserMenu = () => { setAnchorElUser(null); }; + const handleLogout = () => { + googleLogout(); + console.log("Logout"); + }; + return ( @@ -96,6 +101,7 @@ const Navbar = (props) => { > {settings.map((setting) => ( + {setting} ))}