export const layout = "./base.tsx"; export default function ({ children, toc, footnotes }) { return ( <> {toc.length > 0 && ( Table of Contents {toc.map((item, index) => ( {item.text} {item.children.length > 0 && ( {item.children.map((child, i) => ( {child.text} ))} )} ))} )} {children} {footnotes.length > 0 && (