HTML 77.2%
TypeScript 10.5%
Python 9.6%
JavaScript 2.5%
1'use client';2import { useSearchParams } from 'next/navigation';3import { useEffect } from 'react';45/**6 * Legacy `?tab=<id>` deep links (evidence drawer "View history" → `?tab=history&property=`) land on the matching section of the7 * section-nav layout. Maps old tab ids to section anchors; does nothing when the parameter is absent.8 */9const MAP: Record<string, string> = { history: 'change-history', benchmarks: 'benchmarks', providers: 'providers-pricing', hardware: 'hardware-fit', lineage: 'lineage', capabilities: 'capabilities', research: 'papers', timeline: 'timeline', sources: 'provenance' };1011export function ScrollToSection() {12 const sp = useSearchParams();13 const tab = sp.get('tab');14 useEffect(() => {15 if (!tab) return;16 const id = MAP[tab] ?? tab;17 const el = document.getElementById(id);18 if (el) el.scrollIntoView({ block: 'start' });19 }, [tab]);20 return null;21}22