feat(web): assemble header — breadcrumb, search, user menu; remove standalone sign out (#54)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 19:27:43 +02:00
parent 5c8fe3cd81
commit 6efe09d40c
2 changed files with 33 additions and 17 deletions
+5 -16
View File
@@ -1,24 +1,14 @@
import { Outlet, useNavigate } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { Outlet } from "react-router-dom";
import { useLogout } from "../api/queries";
import { Button } from "@/components/ui/button";
import { LangSwitch } from "./lang-switch";
import { ThemeSwitch } from "./theme-switch";
import { Sidebar } from "./sidebar";
import { BreadcrumbProvider } from "./breadcrumb-provider";
import { Breadcrumb } from "./breadcrumb";
import { HeaderSearch } from "./header-search";
import { UserMenu } from "./user-menu";
export function AppShell() {
const { t } = useTranslation();
const navigate = useNavigate();
const logout = useLogout();
const onSignOut = () =>
logout.mutate(undefined, {
onSuccess: () => navigate("/login", { replace: true }),
});
return (
<div className="flex min-h-screen">
<Sidebar />
@@ -26,11 +16,10 @@ export function AppShell() {
<div className="flex flex-1 flex-col">
<header className="flex items-center gap-4 border-b px-4 py-2">
<Breadcrumb />
<HeaderSearch />
<ThemeSwitch />
<LangSwitch />
<Button variant="ghost" size="sm" onClick={onSignOut}>
{t("auth.signOut")}
</Button>
<UserMenu />
</header>
<main className="flex-1 overflow-hidden">
<Outlet />