UI: кнопка «Меню» (гамбургер) в нижней панели → боковое меню справа (плашка аккаунта + Выйти)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 16:39:20 +03:00
co-authored by Claude Opus 4.8
parent 6196c39d25
commit 460b57e792
4 changed files with 122 additions and 6 deletions
+5 -1
View File
@@ -1,3 +1,4 @@
import { useState } from "react";
import { Outlet, useLocation, useNavigate } from "react-router-dom";
import { useMe } from "../hooks/auth";
@@ -5,6 +6,7 @@ import { useServerEvents } from "../hooks/useServerEvents";
import { BottomBar } from "./BottomBar";
import { NotificationBell } from "./NotificationBell";
import { NotificationToaster } from "./NotificationToaster";
import { SideMenu } from "./SideMenu";
const TITLES: Record<string, string> = {
"/": "Forbidden Stars",
@@ -19,6 +21,7 @@ export function AppShell() {
const location = useLocation();
const navigate = useNavigate();
const { data: me } = useMe();
const [menuOpen, setMenuOpen] = useState(false);
useServerEvents(!!me); // живые обновления (SSE) только при наличии сессии
const title =
TITLES[location.pathname] ??
@@ -49,7 +52,8 @@ export function AppShell() {
<Outlet />
</main>
<BottomBar />
<SideMenu open={menuOpen} onClose={() => setMenuOpen(false)} />
<BottomBar onMenu={() => setMenuOpen(true)} />
</div>
);
}