import { useEffect } from 'react'; import { Link, Outlet } from '@tanstack/react-router'; import { GitMerge, Moon, Radio, Sparkles, Sun, Table, TrendingUp, Trophy } from 'lucide-react'; import type { LucideIcon } from 'lucide-react'; import { useUiStore } from '@/stores/uiStore'; import { useTournamentStore } from '@/stores/tournamentStore'; import { cn } from '@/lib/cn'; const NAV: { to: string; label: string; exact: boolean; icon: LucideIcon }[] = [ { to: '/', label: 'Live', exact: true, icon: Radio }, { to: '/groups', label: 'Groups', exact: false, icon: Table }, { to: '/bracket', label: 'Bracket', exact: false, icon: GitMerge }, { to: '/predict', label: 'Predict', exact: false, icon: TrendingUp }, { to: '/story', label: 'Story', exact: false, icon: Sparkles }, ]; function ConnectionStatus() { const status = useTournamentStore((s) => s.status); const source = useTournamentStore((s) => s.snapshot?.source); if (status === 'live') { return ( Live ); } return ( {status === 'connecting' ? '…' : 'Offline'} ); } function ThemeToggle() { const theme = useUiStore((s) => s.theme); const toggle = useUiStore((s) => s.toggleTheme); return ( ); } export function RootLayout() { useEffect(() => { useTournamentStore.getState().init(); }, []); return (
Cup26
{/* Mobile bottom tab bar */}
); }