From 5f8fc1c2e195ab7e3a62b42383cb59d3636e550c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Quiroz?= Date: Mon, 19 Dec 2022 22:39:51 -0300 Subject: [PATCH] chore: extract to variable --- src/components/UI/docs/DocsLinks.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/UI/docs/DocsLinks.tsx b/src/components/UI/docs/DocsLinks.tsx index 014291746b..808c6e23b1 100644 --- a/src/components/UI/docs/DocsLinks.tsx +++ b/src/components/UI/docs/DocsLinks.tsx @@ -51,8 +51,10 @@ export const DocsLinks: FC = ({ navLinks, toggleMobileAccordion }) => { {navLinks.map(({ id, to, items }, idx) => { const split = to?.split('/'); const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; + const isSectionActive = openSections[id]; + return ( - + {({ isExpanded }) => ( <>