From 57580e418ea31677dc7d68dd712db7f861258888 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 22 Dec 2025 02:16:28 -0500 Subject: [PATCH] update frontend --- src/App.jsx | 43 ++++++++++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index dfbd80a..f1593ad 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -52,8 +52,9 @@ export default function App() { } }, [theme]); - // Chats actifs (s'ajoutent quand on clique sur Contacts) + // Chats actifs (s'ajoutent quand on clique sur un contact) const [activeChats, setActiveChats] = useState([]); + const [showContactsList, setShowContactsList] = useState(false); useEffect(() => { try { @@ -73,8 +74,11 @@ export default function App() { if (!activeChats.includes(name)) { setActiveChats(prev => [...prev, name]); } + setShowContactsList(false); }; + const contactsList = ["Amely", "Nancy", "Stéphanie"]; + return (
@@ -110,24 +114,33 @@ export default function App() {
- {/* Barre toujours visible, se remplit progressivement */} -
-
- {activeChats.map((name, idx) => ( -
-
👤
- {name} - + {/* Bouton Contacts flottant en bas à droite */} + + + {/* Liste des contacts (dropdown) */} + {showContactsList && ( +
+ {contactsList.map((name, idx) => ( +
openChat(name)}> +
👤
+ {name}
))}
-
-
openChat("Contacts")}> - 👥 - Contacts - 34/84 + )} + + {/* Bulles de chats actifs flottantes à côté du bouton */} +
+ {activeChats.map((name, idx) => ( +
+
👤
+ {name} +
-
+ ))}