'use client'; import clsx from 'clsx'; import Anchor from 'components/mdx/anchor'; import { SingleToc } from 'lib/utils'; import { Fragment, memo, useState } from 'react'; import { FiChevronDown } from 'react-icons/fi'; import styles from './post-toc.module.css'; interface Props { toc: SingleToc[]; tocLength: number; } const TocItem = ({ item }: { item: SingleToc }) => { return (
  • {item.head}
  • ); }; const PostToc = ({ toc, tocLength }: Props) => { const [show, setShow] = useState(false); const handleClick = () => setShow((show) => !show); return ( <>
    TABLE OF CONTENTS
    ); }; export default memo(PostToc);