diff --git a/packages/frontend/src/shell/AppLayout.tsx b/packages/frontend/src/shell/AppLayout.tsx index b2eaa48..0aa226a 100644 --- a/packages/frontend/src/shell/AppLayout.tsx +++ b/packages/frontend/src/shell/AppLayout.tsx @@ -125,7 +125,7 @@ export function AppLayout() { isModuleEnabled('deals') || isModuleEnabled('pipelines'); const [crmOpen, setCrmOpen] = useState(true); - const [appsOpen, setAppsOpen] = useState(true); + const [appsOpen, setAppsOpen] = useState(false); const [collapsed, setCollapsed] = useState(() => { return localStorage.getItem('sidebar-collapsed') === 'true'; }); diff --git a/packages/frontend/src/shell/DashboardPage.tsx b/packages/frontend/src/shell/DashboardPage.tsx index 3ea4a97..a509d4b 100644 --- a/packages/frontend/src/shell/DashboardPage.tsx +++ b/packages/frontend/src/shell/DashboardPage.tsx @@ -1,4 +1,5 @@ -import { useState } from 'react'; +import { useState, useEffect } from 'react'; +import { useLocation } from 'react-router-dom'; import { useAuth } from '../auth/AuthContext'; import { WeatherWidget } from '../components/WeatherWidget'; import { AnalogClock } from '../components/AnalogClock'; @@ -698,8 +699,14 @@ function ComingSoonTab({ label }: { label: string }) { export function DashboardPage() { const { user } = useAuth(); + const location = useLocation(); const [activeTab, setActiveTab] = useState('home'); + // Immer auf Home-Tab springen wenn Dashboard-NavLink geklickt wird + useEffect(() => { + setActiveTab('home'); + }, [location.key]); + return (
{/* Tab-Leiste */}