/* eslint-disable react/jsx-max-depth */ /* eslint-disable import/no-relative-parent-imports */ /* eslint-disable eslint/no-void */ /* eslint-disable oxc/no-optional-chaining */ import {Container, Typography, Button, Paper, Box} from '@mui/material'; import {type ReactNode} from 'react'; import {useAuth} from '../contexts/AuthContext.js'; import {useNavigate} from 'react-router-dom'; export const Dashboard = (): ReactNode => { const {user, logout} = useAuth(); const navigate = useNavigate(); const handleLogout = (): void => { logout(); void navigate('/login'); }; return ( Dashboard Welcome, {user?.name ?? ''}! Email: {user?.email ?? ''} This is a protected page. You can only see this because you are logged in. ); };