From 73b474caeee13f3d200afe5ad3126abdefe3069b Mon Sep 17 00:00:00 2001 From: Femoon <839242981@qq.com> Date: Mon, 22 Apr 2024 17:21:20 +0800 Subject: [PATCH] fix: medium theme catalog miss --- themes/medium/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/themes/medium/index.js b/themes/medium/index.js index 3b2e0b90..fa473c49 100644 --- a/themes/medium/index.js +++ b/themes/medium/index.js @@ -46,12 +46,17 @@ export const useMediumGlobal = () => useContext(ThemeGlobalMedium) * @constructor */ const LayoutBase = props => { - const { children, showInfoCard = true, slotRight, notice } = props + const { children, showInfoCard = true, post, notice } = props const { locale } = useGlobal() const router = useRouter() const [tocVisible, changeTocVisible] = useState(false) const { onLoading, fullWidth } = useGlobal() + const slotRight = post?.toc?.length > 0 && ( +
+ +
+ ) const slotTop = return (