diff --git a/dashboard/src/App.tsx b/dashboard/src/App.tsx index 6c49ebc2..f1ae7faa 100644 --- a/dashboard/src/App.tsx +++ b/dashboard/src/App.tsx @@ -14,6 +14,7 @@ import JournalPage from '@/pages/JournalPage'; import PatternsPage from '@/pages/PatternsPage'; import PersonalityPage from '@/pages/PersonalityPage'; import ReportsPage from '@/pages/ReportsPage'; +import { useFeatureFlags } from '@/hooks/useFeatureFlags'; const ROUTE_TITLES: Record = { '/dashboard': 'Dashboard', @@ -64,6 +65,8 @@ function RouteEffects() { } export default function App() { + const { flags } = useFeatureFlags(); + return ( @@ -77,7 +80,10 @@ export default function App() { } /> } /> } /> - } /> + : } + /> } /> } /> } /> diff --git a/dashboard/src/components/layout/Header.tsx b/dashboard/src/components/layout/Header.tsx index 65c570b8..5398554b 100644 --- a/dashboard/src/components/layout/Header.tsx +++ b/dashboard/src/components/layout/Header.tsx @@ -26,6 +26,7 @@ import { import { ThemeToggle } from './ThemeToggle'; import { Logo } from '@/components/brand/Logo'; import { cn } from '@/lib/utils'; +import { useFeatureFlags } from '@/hooks/useFeatureFlags'; const NAV_ITEMS = [ { href: '/dashboard', label: 'Dashboard', icon: LayoutDashboard, exact: true }, @@ -48,6 +49,10 @@ interface HeaderProps { export function Header({ onOpenSearch }: HeaderProps) { const { pathname } = useLocation(); + const { flags } = useFeatureFlags(); + const navItems = flags.personalityEnabled + ? NAV_ITEMS + : NAV_ITEMS.filter((item) => item.href !== '/personality'); const isActive = (href: string, exact: boolean) => exact ? pathname === href : pathname.startsWith(href); @@ -82,7 +87,7 @@ export function Header({ onOpenSearch }: HeaderProps) { Navigation menu