From a520954b355a54e8456511ef2e8b47c5c8983f9a Mon Sep 17 00:00:00 2001 From: chayan das <145531182+Chayan8837@users.noreply.github.com> Date: Thu, 23 Jan 2025 23:48:19 +0530 Subject: [PATCH 1/2] side bar drop down fix --- components/Sidebar.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx index 67ed853bc..9b150604c 100644 --- a/components/Sidebar.tsx +++ b/components/Sidebar.tsx @@ -269,6 +269,12 @@ export const DocsNav = ({ }); useEffect(() => { const pathWtihoutFragment = extractPathWithoutFragment(router.asPath); + setActive({ + getDocs: false, + getStarted: false, + getReference: false, + getSpecification: false, + }); if (getDocsPath.includes(pathWtihoutFragment)) { setActive({ ...active, getDocs: true }); } else if (getStartedPath.includes(pathWtihoutFragment)) { @@ -279,7 +285,7 @@ export const DocsNav = ({ setActive({ ...active, getSpecification: true }); } }, [router.asPath]); - + const handleClickDoc = () => { setActive({ ...active, getDocs: !active.getDocs }); }; From 70d3c6f12d22c0c13339ce378589eedf61ebf0cf Mon Sep 17 00:00:00 2001 From: chayan das <145531182+Chayan8837@users.noreply.github.com> Date: Fri, 24 Jan 2025 00:09:36 +0530 Subject: [PATCH 2/2] . --- components/Sidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx index 9b150604c..6f4058b8b 100644 --- a/components/Sidebar.tsx +++ b/components/Sidebar.tsx @@ -285,7 +285,7 @@ export const DocsNav = ({ setActive({ ...active, getSpecification: true }); } }, [router.asPath]); - + const handleClickDoc = () => { setActive({ ...active, getDocs: !active.getDocs }); };