diff --git a/themes/gitbook/components/Catalog.js b/themes/gitbook/components/Catalog.js index fde3b9f2..90f5111d 100644 --- a/themes/gitbook/components/Catalog.js +++ b/themes/gitbook/components/Catalog.js @@ -1,3 +1,4 @@ +import { useGlobal } from '@/lib/global' import { isBrowser } from '@/lib/utils' import throttle from 'lodash.throttle' import { uuidToId } from 'notion-utils' @@ -13,6 +14,7 @@ const Catalog = ({ post }) => { const toc = post?.toc // 同步选中目录事件 const [activeSection, setActiveSection] = useState(null) + const {locale}= useGlobal() // 监听滚动事件 useEffect(() => { @@ -67,6 +69,7 @@ const Catalog = ({ post }) => { return ( <> +
{locale.COMMON.TABLE_OF_CONTENTS}