chore: update

This commit is contained in:
2026-03-30 20:02:39 +02:00
parent 32e129da31
commit 25cd6429f2
32 changed files with 1024 additions and 540 deletions
+13
View File
@@ -1,6 +1,7 @@
import { useState, useEffect, useRef, useCallback } from "react";
import { useNavigate, useLocation } from "react-router-dom";
import { useCart } from "../context/useCart";
import { useTheme } from "../context/ThemeContext";
import "./Navbar.css";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
@@ -15,6 +16,8 @@ import {
faBell,
faGift,
faUserCircle,
faSun,
faMoon,
} from "@fortawesome/free-solid-svg-icons";
import { faTelegram } from "@fortawesome/free-brands-svg-icons";
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
@@ -29,6 +32,7 @@ interface MenuItem {
}
function Navbar() {
const { theme, toggleTheme } = useTheme();
const [isMenuOpen, setIsMenuOpen] = useState<boolean>(false);
const [isLoggingOut, setIsLoggingOut] = useState<boolean>(false);
const [notifications, setNotifications] = useState<ClientNotification[]>([]);
@@ -155,6 +159,15 @@ function Navbar() {
<span className="topbar-brand">MilieuNantais</span>
<div className="topbar-actions">
{/* Theme toggle */}
<button
className="topbar-theme-btn"
onClick={toggleTheme}
aria-label={theme === "dark" ? "Passer en mode clair" : "Passer en mode sombre"}
>
<FontAwesomeIcon icon={theme === "dark" ? faSun : faMoon} />
</button>
{/* Notifications */}
<div className="notif-wrapper" ref={notifPanelRef}>
<button