mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 00:16:41 +02:00
fix(frontend): Topbar auf Dashboard ausblenden – Profil nur in Tab-Leiste
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2af54246c8
commit
8b4a71edb2
1 changed files with 7 additions and 3 deletions
|
|
@ -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 */}
|
||||
<header className={styles.topbar}>
|
||||
{/* Topbar: Profil + Logout + Modiwahl oben rechts (nicht auf Dashboard) */}
|
||||
<header className={styles.topbar} style={isDashboard ? { display: 'none' } : undefined}>
|
||||
{/* Theme-Schalter (☀ ☾ ⚙) */}
|
||||
<div className={styles.topbarThemeGroup}>
|
||||
{THEME_OPTIONS.map((opt) => (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue