diff --git a/themes/fukasawa/components/Catalog.js b/themes/fukasawa/components/Catalog.js index 0e1cde78..4bee0c3e 100644 --- a/themes/fukasawa/components/Catalog.js +++ b/themes/fukasawa/components/Catalog.js @@ -1,7 +1,7 @@ -import { useEffect, useRef, useState } from 'react' +import { useGlobal } from '@/lib/global' import throttle from 'lodash.throttle' import { uuidToId } from 'notion-utils' -import { useGlobal } from '@/lib/global' +import { useEffect, useRef, useState } from 'react' /** * 目录导航组件 @@ -58,29 +58,37 @@ const Catalog = ({ toc }) => { if (!toc || toc?.length < 1) { return <>> } - return
- {navBarTitle} + {post?.title}
) : (@@ -97,34 +98,32 @@ const NavBar = props => { id: 2, name: locale.NAV.RSS, href: '/feed', - show: - siteConfig('ENABLE_RSS') && - siteConfig('NOBELIUM_MENU_RSS', null, CONFIG), + show: siteConfig('ENABLE_RSS') && siteConfig('NOBELIUM_MENU_RSS'), target: '_blank' }, { icon: 'fas fa-search', name: locale.NAV.SEARCH, href: '/search', - show: siteConfig('NOBELIUM_MENU_SEARCH', null, CONFIG) + show: siteConfig('NOBELIUM_MENU_SEARCH') }, { icon: 'fas fa-archive', name: locale.NAV.ARCHIVE, href: '/archive', - show: siteConfig('NOBELIUM_MENU_ARCHIVE', null, CONFIG) + show: siteConfig('NOBELIUM_MENU_ARCHIVE') }, { icon: 'fas fa-folder', name: locale.COMMON.CATEGORY, href: '/category', - show: siteConfig('NOBELIUM_MENU_CATEGORY', null, CONFIG) + show: siteConfig('NOBELIUM_MENU_CATEGORY') }, { icon: 'fas fa-tag', name: locale.COMMON.TAGS, href: '/tag', - show: siteConfig('NOBELIUM_MENU_TAG', null, CONFIG) + show: siteConfig('NOBELIUM_MENU_TAG') } ] if (customNav) { @@ -167,12 +166,14 @@ const NavBar = props => {