Files
breakpilot-lehrer/website/app/admin/docs/audit/_components/TableOfContents.tsx
Benjamin Admin 0b37c5e692 [split-required] Split website + studio-v2 monoliths (Phase 3 continued)
Website (14 monoliths split):
- compliance/page.tsx (1,519 → 9), docs/audit (1,262 → 20)
- quality (1,231 → 16), alerts (1,203 → 10), docs (1,202 → 11)
- i18n.ts (1,173 → 8 language files)
- unity-bridge (1,094 → 12), backlog (1,087 → 6)
- training (1,066 → 8), rag (1,063 → 8)
- Deleted index_original.ts (4,899 LOC dead backup)

Studio-v2 (5 monoliths split):
- meet/page.tsx (1,481 → 9), messages (1,166 → 9)
- AlertsB2BContext.tsx (1,165 → 5 modules)
- alerts-b2b/page.tsx (1,019 → 6), korrektur/archiv (1,001 → 6)

All existing imports preserved. Zero new TypeScript errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-24 17:52:36 +02:00

42 lines
1.4 KiB
TypeScript

'use client'
/**
* Sidebar table of contents for navigating audit documentation sections.
*/
import { SECTIONS } from '../constants'
interface TableOfContentsProps {
activeSection: string
onScrollToSection: (sectionId: string) => void
}
export function TableOfContents({ activeSection, onScrollToSection }: TableOfContentsProps) {
return (
<aside className="w-64 flex-shrink-0 border-r border-slate-200 bg-slate-50 overflow-y-auto fixed left-64 top-16 bottom-0 z-20">
<div className="p-4">
<h2 className="text-sm font-semibold text-slate-900 uppercase tracking-wider mb-4">
Inhaltsverzeichnis
</h2>
<nav className="space-y-0.5">
{SECTIONS.map((section) => (
<button
key={section.id}
onClick={() => onScrollToSection(section.id)}
className={`w-full text-left px-2 py-1.5 text-sm rounded transition-colors ${
section.level === 2 ? 'font-medium' : 'ml-3 text-xs'
} ${
activeSection === section.id
? 'bg-primary-100 text-primary-700'
: 'text-slate-600 hover:bg-slate-200 hover:text-slate-900'
}`}
>
{section.id.includes('-') ? '' : `${section.id}. `}{section.title}
</button>
))}
</nav>
</div>
</aside>
)
}