From 1e4cb508ccee1d94318b7a5900ecf5aa12341b21 Mon Sep 17 00:00:00 2001 From: Giovanni-Josserand Date: Wed, 10 Dec 2025 15:07:29 +0100 Subject: [PATCH] change header svg by img tag --- src/components/Header/Header.jsx | 11 ++++++----- src/components/Header/Header.module.css | 3 ++- src/components/SearchBar/SearchBar.module.css | 1 - 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/Header/Header.jsx b/src/components/Header/Header.jsx index 1a44fdb..4ee13ff 100644 --- a/src/components/Header/Header.jsx +++ b/src/components/Header/Header.jsx @@ -7,7 +7,7 @@ function Header() { const [notificationMenu, setnotificationMenu] = useState(false); const [unreadNotification, setunreadNotification] = useState(true); const [mobileMenu, setMobileMenu] = useState(false); - const [notifications, setNotifications] = useState([]); + const [notifications, setNotifications] = useState([{"content" : "ok"}, {"content" : "pourquoi pas antoine"}]); const notificationRef = useRef(null); @@ -15,7 +15,10 @@ function Header() { useEffect(() => { async function loadNotifications() { const notifData = await getUserNotifications(); + /* setNotifications(notifData || []); + */ + } //loadNotifications(); @@ -105,7 +108,7 @@ function Header() { className={`${styles.notificationDiv} glassCard ${notificationMenu ? styles.activeNotificationDiv : ""}`} > {notifications.length === 0 ? ( -

Vous n'avez aucune notification !

+

Vous n'avez aucune notification !

) : ( notifications.map((notification, index) => (
@@ -114,9 +117,7 @@ function Header() { className={styles.closeBtn} onClick={() => setNotifications(prev => prev.filter((_, i) => i !== index))} > - - - + supprimer la notification
)) diff --git a/src/components/Header/Header.module.css b/src/components/Header/Header.module.css index 1aaa72b..c9ffc2b 100644 --- a/src/components/Header/Header.module.css +++ b/src/components/Header/Header.module.css @@ -175,10 +175,11 @@ } .notification{ - margin-bottom: 7%; + padding: 0.5em 1em; display: flex; justify-content: space-between; align-items: center; + border-radius: 15px; } .notificationBadge { diff --git a/src/components/SearchBar/SearchBar.module.css b/src/components/SearchBar/SearchBar.module.css index a58f1de..d35c808 100644 --- a/src/components/SearchBar/SearchBar.module.css +++ b/src/components/SearchBar/SearchBar.module.css @@ -31,7 +31,6 @@ .searchedEvent{ display: flex; padding: 0.5rem; - border-radius: 15px; align-items: center; }