/** * NavigationBreadcrumbs Component * * Навігація між шарами: Space → City → DAO → Agent */ import { Link, useLocation } from 'react-router-dom'; import { ChevronRight } from 'lucide-react'; interface NavigationLevel { label: string; path: string; icon?: string; } export function NavigationBreadcrumbs() { const location = useLocation(); // Визначити поточний рівень навігації const levels: NavigationLevel[] = []; if (location.pathname.startsWith('/space')) { levels.push({ label: 'Space', path: '/space', icon: '🌌' }); } if (location.pathname.startsWith('/city') || location.pathname.startsWith('/space')) { if (!location.pathname.startsWith('/space')) { levels.push({ label: 'City', path: '/city-v2', icon: '🏙️' }); } } if (location.pathname.startsWith('/microdao/')) { const parts = location.pathname.split('/'); const daoId = parts[2]; levels.push( { label: 'City', path: '/city-v2', icon: '🏙️' }, { label: daoId, path: `/microdao/${daoId}`, icon: '🏛️' } ); } if (location.pathname.startsWith('/agent/')) { const parts = location.pathname.split('/'); const agentId = parts[2]; levels.push( { label: 'City', path: '/city-v2', icon: '🏙️' }, { label: agentId, path: `/agent/${agentId}`, icon: '🤖' } ); } if (levels.length === 0) return null; return (