import { ListTree } from 'lucide-react'; import { cn } from '@/lib/utils'; import { TocItem } from './SkillViewer'; import { ScrollArea } from '@/components/ui/scroll-area'; interface TableOfContentsProps { toc: TocItem[]; } export function TableOfContents({ toc }: TableOfContentsProps) { if (toc.length === 0) { return null; } const handleClick = (e: React.MouseEvent, id: string) => { e.preventDefault(); const el = document.getElementById(id); if (el) { el.scrollIntoView({ behavior: 'smooth', block: 'start' }); } }; return (

On this page

); }