'use client'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { BookOpen, ExternalLink, Moon, Sun } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { usePublicSettings } from '@/providers/public-settings-provider'; import { useTheme } from '@/providers/theme-provider'; import { getApiBaseUrl } from '@/lib/api'; import { cn } from '@/lib/utils'; export function DocsHeader() { const { projectName } = usePublicSettings(); const { resolvedTheme, setTheme } = useTheme(); const apiUrl = getApiBaseUrl(); return ( {projectName} Docs Swagger setTheme(resolvedTheme === 'dark' ? 'light' : 'dark')} > {resolvedTheme === 'dark' ? : } ); } export function DocsSidebar({ groups }: { groups: Array<[string, Array<{ slug: string; title: string }>]> }) { const pathname = usePathname(); return ( Главная {groups.map(([group, items]) => ( {group} {items.map((item) => { const href = `/docs/${item.slug}`; const active = pathname === href; return ( {item.title} ); })} ))} ); } export function DocsToc({ sections }: { sections: Array<{ id: string; title: string }> }) { return ( На этой странице {sections.map((section) => ( {section.title} ))} ); }
{group}
На этой странице