diff --git a/themes/medium/index.js b/themes/medium/index.js index b4d56abd..9648a866 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 (