import { ReactNode, Fragment, useState, useContext } from "react"; import { type Toc } from "@stefanprobst/rehype-extract-toc"; import { useLocation } from "react-router-dom"; import { HeadingContext } from "./HeadingContext"; function RecursivelyToc({ toc }: { toc: Toc }) { const location = useLocation(); const [activeHeadings] = useContext(HeadingContext); return ( ); } export default function DynamicLayout({ children, toc, }: { children: ReactNode; toc: Toc; }) { const [activeHeadings, setActiveHeadings] = useState([]); return (
{children}
); }