60 ? "block" : "none",
opacity: isPostFooterInView ? 0 : 1,
visibility: isPostFooterInView ? "hidden" : "visible",
}}
diff --git a/src/components/site/PostToc.tsx b/src/components/site/PostToc.tsx
index a2d36d20..008350cb 100644
--- a/src/components/site/PostToc.tsx
+++ b/src/components/site/PostToc.tsx
@@ -135,28 +135,12 @@ export const PostToc: React.FC<{
}> = ({ data }) => {
const containerRef = useRef
(null)
- const [maxWidth, setMaxWidth] = useState(0)
- useEffect(() => {
- if (containerRef?.current) {
- setMaxWidth(
- (window.innerWidth -
- (containerRef.current?.parentElement?.clientWidth || 0)) /
- 2 -
- 40,
- )
- }
- }, [containerRef])
-
const idList = getIds(data?.map)
const activeId = useActiveId(idList)
return (
60 ? maxWidth : 0,
- display: maxWidth > 60 ? "block" : "none",
- }}
+ className="xlog-post-toc absolute left-full pl-10 h-full top-0 lg:block hidden"
ref={containerRef}
>