update frontend
This commit is contained in:
parent
c043dbf8dc
commit
d25bbf21a2
|
|
@ -2,7 +2,6 @@ import React, { Suspense, useEffect, useState, useCallback } from "react";
|
||||||
import TopBar from "./components/Layout/TopBar";
|
import TopBar from "./components/Layout/TopBar";
|
||||||
import PostList from "./components/Posts/PostList";
|
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 MapView = React.lazy(() => import("./components/Map/MapView"));
|
||||||
|
|
||||||
const THEME_KEY = "sociowire:theme";
|
const THEME_KEY = "sociowire:theme";
|
||||||
|
|
@ -69,7 +68,7 @@ export default function App() {
|
||||||
} catch {}
|
} catch {}
|
||||||
}, [activeChats]);
|
}, [activeChats]);
|
||||||
|
|
||||||
// Ouvrir un chat (simulé ici par un clic sur Contacts)
|
// Ouvrir un chat
|
||||||
const openChat = (name) => {
|
const openChat = (name) => {
|
||||||
if (!activeChats.includes(name)) {
|
if (!activeChats.includes(name)) {
|
||||||
setActiveChats(prev => [...prev, name]);
|
setActiveChats(prev => [...prev, name]);
|
||||||
|
|
@ -111,8 +110,7 @@ export default function App() {
|
||||||
|
|
||||||
<div style={{ height: 18 }} />
|
<div style={{ height: 18 }} />
|
||||||
|
|
||||||
{/* Barre dynamique transparente : apparaît seulement s’il y a des chats */}
|
{/* Barre toujours visible, se remplit progressivement */}
|
||||||
{activeChats.length > 0 && (
|
|
||||||
<div className="bottom-bar">
|
<div className="bottom-bar">
|
||||||
<div className="bottom-left">
|
<div className="bottom-left">
|
||||||
{activeChats.map((name, idx) => (
|
{activeChats.map((name, idx) => (
|
||||||
|
|
@ -131,7 +129,6 @@ export default function App() {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue