diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx deleted file mode 100644 index 19c3800..0000000 --- a/src/components/Navbar.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { AppBar, Toolbar, Typography, Button, IconButton } from '@mui/material'; -import '../styles.css'; -import { makeStyles } from '@mui/styles'; -import React, { useContext } from 'react'; -import AuthContext from "@contexts/AuthContext"; -import { Link } from 'react-router-dom'; -import theme from '../theme'; -import { useTranslation } from "react-i18next"; -import LanguageSwitcher from './LanguageSwitcher'; -import useNightMode from '../hooks/backend/userService/useNightMode'; // Assurez-vous que le chemin d'accès est correct -import Brightness7Icon from '@mui/icons-material/Brightness7'; // icône de soleil -import Brightness4Icon from '@mui/icons-material/Brightness4'; // icône de lune - -const useStyles = makeStyles({ - title: { - flexGrow: 1, - }, - navButton: { - '&:hover': { - color: theme.palette.primary.main , - backgroundColor: 'white !important', - }, - }, -}); - - -const Navbar = () => { - const { isLoggedIn, logout } = useContext(AuthContext); - const { t } = useTranslation(); - const { isNightMode, toggleNightMode } = useNightMode(); - - const handleLogout = () => { - logout(); - }; - - const handleToggleNightMode = () => { - toggleNightMode().then(() => { - window.location.reload(); - }).catch(err => { - console.error('Error switching when switching night mode', err); - }); - }; - - const classes = useStyles(); - - return ( - - - - {t('navbar.dashboard')} - - - {isNightMode ? : } - - - {!isLoggedIn && ( - <> - - - )} - {isLoggedIn && ( - <> - - - - - )} - - - ); -}; - -export default Navbar;