diff --git a/themes/medium/components/BottomMenuBar.js b/themes/medium/components/BottomMenuBar.js
index 23979d9e..c04269c2 100644
--- a/themes/medium/components/BottomMenuBar.js
+++ b/themes/medium/components/BottomMenuBar.js
@@ -1,8 +1,8 @@
import Link from 'next/link'
-import { useMediumGlobal } from '@/themes/medium'
+import { useMediumGlobal } from '..'
import JumpToTopButton from './JumpToTopButton'
-export default function BottomMenuBar ({ post, className }) {
+export default function BottomMenuBar({ post, className }) {
const { tocVisible, changeTocVisible } = useMediumGlobal()
const showTocButton = post?.toc?.length > 0
@@ -11,24 +11,34 @@ export default function BottomMenuBar ({ post, className }) {
}
return (
-
+
-
+
-
+
- {showTocButton &&
-
-
}
- { !showTocButton &&
-
-
+ {showTocButton && (
+
+
- }
+ )}
+ {!showTocButton && (
+
+
+
+
+
+ )}
)
diff --git a/themes/medium/components/TocDrawer.js b/themes/medium/components/TocDrawer.js
index 0df5cb56..9c04701e 100644
--- a/themes/medium/components/TocDrawer.js
+++ b/themes/medium/components/TocDrawer.js
@@ -1,5 +1,5 @@
+import { useMediumGlobal } from '..'
import Catalog from './Catalog'
-import { useMediumGlobal } from '@/themes/medium'
/**
* 悬浮抽屉目录
@@ -13,22 +13,36 @@ const TocDrawer = ({ post, cRef }) => {
const switchVisible = () => {
changeTocVisible(!tocVisible)
}
- return <>
-
- {/* 侧边菜单 */}
-
- {post && <>
-
-
-
- >}
+ return (
+ <>
+
+ {/* 侧边菜单 */}
+
+ {post && (
+ <>
+
+
+
+ >
+ )}
+
-
- {/* 背景蒙版 */}
-
- >
+ {/* 背景蒙版 */}
+
+ >
+ )
}
export default TocDrawer