|
|
@@ -14,12 +14,15 @@ import ListItemIcon from '@mui/material/ListItemIcon';
|
|
|
import ListItemText from '@mui/material/ListItemText';
|
|
|
import MailIcon from '@mui/icons-material/Mail';
|
|
|
import MenuIcon from '@mui/icons-material/Menu';
|
|
|
+import Button from '@mui/material/Button';
|
|
|
import Toolbar from '@mui/material/Toolbar';
|
|
|
import Typography from '@mui/material/Typography';
|
|
|
+import useAuth from '../Auth/useAuth';
|
|
|
|
|
|
const drawerWidth = 240;
|
|
|
|
|
|
export function User(props) {
|
|
|
+
|
|
|
const { window } = props;
|
|
|
const [mobileOpen, setMobileOpen] = React.useState(false);
|
|
|
|
|
|
@@ -27,6 +30,8 @@ export function User(props) {
|
|
|
setMobileOpen(!mobileOpen);
|
|
|
};
|
|
|
|
|
|
+ const auth = useAuth();
|
|
|
+
|
|
|
const drawer = (
|
|
|
<div>
|
|
|
<Toolbar />
|
|
|
@@ -126,6 +131,9 @@ export function User(props) {
|
|
|
<Typography paragraph>
|
|
|
Bienvenido User
|
|
|
</Typography>
|
|
|
+ <div>
|
|
|
+ <Button onClick={auth.logout} variant="contained">Cerrar Session</Button>
|
|
|
+ </div>
|
|
|
</Box>
|
|
|
</Box>
|
|
|
);
|