MCPcopy Create free account
hub / github.com/arktypeio/arktype / useActiveEntry

Function useActiveEntry

ark/docs/components/shell/Toc.tsx:10–11  ·  view source on GitHub ↗
(entries: TocEntry[])

Source from the content-addressed store, hash-verified

8import { useScrollspy } from "./scrollspy.ts"
9
10const useActiveEntry = (entries: TocEntry[]) =>
11 useScrollspy(useMemo(() => entries.map(entry => entry.id), [entries]))
12
13/** the shallowest heading depth, so a page of only H3s doesn't render as all subs */
14const topDepth = (entries: TocEntry[]) =>

Callers 2

TocFunction · 0.85
MobileTocFunction · 0.85

Calls 2

useScrollspyFunction · 0.90
mapMethod · 0.65

Tested by

no test coverage detected