/* Copyright 2021, vite-plugin-book by Mirone. */ import { FC } from 'react'; import { useLocation } from 'react-router-dom'; import { useOutline } from '../../hook/useOutline'; import cx from './Outline.module.css'; type OutlineItem = { text: string; active?: boolean; level: number; }; export type OutlineList = OutlineItem[]; const NestedDiv: FC<{ level: number }> = ({ level, children }) => { if (level === 0) { return <>{children}>; } return (