fix: medium theme catalog miss

This commit is contained in:
Femoon
2024-04-22 17:21:20 +08:00
parent 6e31eba95f
commit 73b474caee

View File

@@ -46,12 +46,17 @@ export const useMediumGlobal = () => useContext(ThemeGlobalMedium)
* @constructor * @constructor
*/ */
const LayoutBase = props => { const LayoutBase = props => {
const { children, showInfoCard = true, slotRight, notice } = props const { children, showInfoCard = true, post, notice } = props
const { locale } = useGlobal() const { locale } = useGlobal()
const router = useRouter() const router = useRouter()
const [tocVisible, changeTocVisible] = useState(false) const [tocVisible, changeTocVisible] = useState(false)
const { onLoading, fullWidth } = useGlobal() const { onLoading, fullWidth } = useGlobal()
const slotRight = post?.toc?.length > 0 && (
<div key={locale.COMMON.TABLE_OF_CONTENTS} >
<Catalog toc={post?.toc} />
</div>
)
const slotTop = <BlogPostBar {...props} /> const slotTop = <BlogPostBar {...props} />
return ( return (