From 8b4a71edb2b9f100e51bfa85c62141ef83259f3f Mon Sep 17 00:00:00 2001 From: Thomas Reitz Date: Fri, 13 Mar 2026 15:53:26 +0100 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20Topbar=20auf=20Dashboard=20aus?= =?UTF-8?q?blenden=20=E2=80=93=20Profil=20nur=20in=20Tab-Leiste?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- packages/frontend/src/shell/AppLayout.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/shell/AppLayout.tsx b/packages/frontend/src/shell/AppLayout.tsx index fdc1086..ad84589 100644 --- a/packages/frontend/src/shell/AppLayout.tsx +++ b/packages/frontend/src/shell/AppLayout.tsx @@ -1,5 +1,5 @@ import { useState, useEffect, useCallback } from 'react'; -import { Outlet, NavLink, useNavigate } from 'react-router-dom'; +import { Outlet, NavLink, useNavigate, useLocation } from 'react-router-dom'; import { useQuery } from '@tanstack/react-query'; import { useAuth } from '../auth/AuthContext'; import { UserAvatar } from '../components/UserAvatar'; @@ -113,7 +113,11 @@ const THEME_OPTIONS = [ export function AppLayout() { const { user, logout } = useAuth(); const navigate = useNavigate(); + const location = useLocation(); const { mode, setMode } = useTheme(); + + // Auf der Dashboard-Seite hat die Tab-Leiste bereits das Profil – kein Topbar nötig + const isDashboard = location.pathname === '/'; const { isModuleEnabled } = useCrmSettings(); // Silently sync INSIGHT profile from O365 once per browser session @@ -584,8 +588,8 @@ export function AppLayout() { marginLeft: collapsed ? 60 : (branding?.sidebarWidth ?? undefined), }} > - {/* Topbar: Profil + Logout + Modiwahl oben rechts */} -
+ {/* Topbar: Profil + Logout + Modiwahl oben rechts (nicht auf Dashboard) */} +
{/* Theme-Schalter (☀ ☾ ⚙) */}
{THEME_OPTIONS.map((opt) => (