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 && ( +