diff --git a/src/pages/Doc/single doc/index.jsx b/src/pages/Doc/single doc/index.jsx index 402cfde..fcfd418 100644 --- a/src/pages/Doc/single doc/index.jsx +++ b/src/pages/Doc/single doc/index.jsx @@ -30,6 +30,7 @@ const DocDetail = () => { const [error, setError] = useState(null); const [activeSection, setActiveSection] = useState(null); const [headings, setHeadings] = useState([]); + const [isTOCOpen, setIsTOCOpen] = useState(false); useEffect(() => { const fetchContent = async () => { @@ -38,7 +39,7 @@ const DocDetail = () => { if (!response.ok) { throw new Error(`Failed to fetch content: ${response.statusText}`); } - const text = await response.text(); // Ensure you're reading text + const text = await response.text(); setContent(text); } catch (error) { setError(error.message); @@ -83,29 +84,70 @@ const DocDetail = () => { if (loading) return
; if (error) return ; const headingToId = (children) => String(children).toLowerCase().replace(/\s+/g, '-'); + return (

{slug.replace(/_/g, ' ')}

-
-