'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 (