import { FC } from 'react' import { removeAnchor } from './CustomHTMLElements/CustomHTMLElements.utils' interface TOCHeader { id: number lvl: number seen: number content: string slug: string } interface Props { toc: any } const formatSlug = (slug: string) => { // [Joshen] We will still provide support for headers declared like this: // ## REST API {#rest-api-overview} // At least for now, this was a docusaurus thing. if (slug.includes('#')) return slug.split('-#')[0] return slug } const TableOfContents: FC = ({ toc }) => { // [Joshen] markdown-toc doesn't seem to read maxdepth from the options passed in // Our first level headers will be H2s (H1 is ignored), and we only show up to H3 return ( ) } export default TableOfContents