interface NavSection { id: string label: string tileId: string // data-tile-id to scroll to } interface SubNavProps { activeSection: string onSectionClick: (sectionId: string) => void } const sections: NavSection[] = [ { id: 'overview', label: 'Overview', tileId: 'patient-summary' }, { id: 'skills', label: 'Skills', tileId: 'core-skills' }, { id: 'experience', label: 'Experience', tileId: 'career-activity' }, { id: 'projects', label: 'Projects', tileId: 'projects' }, { id: 'education', label: 'Education', tileId: 'education' }, ] export function SubNav({ activeSection, onSectionClick }: SubNavProps) { const handleSectionClick = (section: NavSection) => { // Scroll to the tile const tileEl = document.querySelector(`[data-tile-id="${section.tileId}"]`) if (tileEl) { tileEl.scrollIntoView({ behavior: 'smooth', block: 'start' }) } // Notify parent of section change onSectionClick(section.id) } return ( ) }