diff --git a/ui/src/components/LayoutShell.tsx b/ui/src/components/LayoutShell.tsx index ef17f094..6d9abcd5 100644 --- a/ui/src/components/LayoutShell.tsx +++ b/ui/src/components/LayoutShell.tsx @@ -1,5 +1,5 @@ import { Outlet, useNavigate, useLocation } from 'react-router'; -import { AppShell, Sidebar, TopBar, CommandPalette, CommandPaletteProvider, GlobalFilterProvider, useCommandPalette, Dropdown, Avatar } from '@cameleer/design-system'; +import { AppShell, Sidebar, TopBar, CommandPalette, CommandPaletteProvider, GlobalFilterProvider, ToastProvider, useCommandPalette } from '@cameleer/design-system'; import { useRouteCatalog } from '../api/queries/catalog'; import { useAuthStore } from '../auth/auth-store'; import { useMemo, useCallback } from 'react'; @@ -41,6 +41,11 @@ function LayoutContent() { })); }, [location.pathname]); + const handleLogout = useCallback(() => { + logout(); + navigate('/login'); + }, [logout, navigate]); + const handlePaletteSelect = useCallback((result: any) => { if (result.path) navigate(result.path); setPaletteOpen(false); @@ -56,22 +61,11 @@ function LayoutContent() { /> } > -