diff --git a/components/post-layout.tsx b/components/post-layout.tsx index a60accc..9921ee9 100644 --- a/components/post-layout.tsx +++ b/components/post-layout.tsx @@ -19,6 +19,17 @@ export function PostLayout({ children, hasToc = true, contentKey }: { children: setMounted(true); }, []); + const mobileToc = isTocOpen && hasToc && mounted + ? createPortal( +
+
+ setIsTocOpen(false)} /> +
+
, + document.body + ) + : null; + const tocButton = hasToc && mounted ? (