update frontend
This commit is contained in:
parent
c043dbf8dc
commit
d25bbf21a2
37
src/App.jsx
37
src/App.jsx
|
|
@ -2,7 +2,6 @@ import React, { Suspense, useEffect, useState, useCallback } from "react";
|
|||
import TopBar from "./components/Layout/TopBar";
|
||||
import PostList from "./components/Posts/PostList";
|
||||
|
||||
// Lazy-load de la carte (gros chunk : maplibre, CSS, etc.)
|
||||
const MapView = React.lazy(() => import("./components/Map/MapView"));
|
||||
|
||||
const THEME_KEY = "sociowire:theme";
|
||||
|
|
@ -69,7 +68,7 @@ export default function App() {
|
|||
} catch {}
|
||||
}, [activeChats]);
|
||||
|
||||
// Ouvrir un chat (simulé ici par un clic sur Contacts)
|
||||
// Ouvrir un chat
|
||||
const openChat = (name) => {
|
||||
if (!activeChats.includes(name)) {
|
||||
setActiveChats(prev => [...prev, name]);
|
||||
|
|
@ -111,27 +110,25 @@ export default function App() {
|
|||
|
||||
<div style={{ height: 18 }} />
|
||||
|
||||
{/* Barre dynamique transparente : apparaît seulement s’il y a des chats */}
|
||||
{activeChats.length > 0 && (
|
||||
<div className="bottom-bar">
|
||||
<div className="bottom-left">
|
||||
{activeChats.map((name, idx) => (
|
||||
<div key={idx} className="bottom-chat">
|
||||
<div className="chat-avatar">👤</div>
|
||||
<span className="chat-name">{name}</span>
|
||||
<button className="bottom-remove" onClick={() => setActiveChats(prev => prev.filter(n => n !== name))}>✕</button>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className="bottom-right">
|
||||
<div className="bottom-contact" onClick={() => openChat("Contacts")}>
|
||||
<span className="contact-icon">👥</span>
|
||||
<span className="contact-text">Contacts</span>
|
||||
<span className="contact-online">34/84</span>
|
||||
{/* Barre toujours visible, se remplit progressivement */}
|
||||
<div className="bottom-bar">
|
||||
<div className="bottom-left">
|
||||
{activeChats.map((name, idx) => (
|
||||
<div key={idx} className="bottom-chat">
|
||||
<div className="chat-avatar">👤</div>
|
||||
<span className="chat-name">{name}</span>
|
||||
<button className="bottom-remove" onClick={() => setActiveChats(prev => prev.filter(n => n !== name))}>✕</button>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div className="bottom-right">
|
||||
<div className="bottom-contact" onClick={() => openChat("Contacts")}>
|
||||
<span className="contact-icon">👥</span>
|
||||
<span className="contact-text">Contacts</span>
|
||||
<span className="contact-online">34/84</span>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue