Update src/components/UI/docs/DocsLinks.tsx

Co-authored-by: Paul Wackerow <54227730+wackerow@users.noreply.github.com>
pull/26374/head
Corwin Smith 2 years ago committed by GitHub
parent 5973cf8cd5
commit d3e53af95f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/components/UI/docs/DocsLinks.tsx

@ -51,7 +51,7 @@ export const DocsLinks: FC<Props> = ({ navLinks, toggleMobileAccordion }) => {
{navLinks.map(({ id, to, items }, idx) => { {navLinks.map(({ id, to, items }, idx) => {
const split = to?.split('/'); const split = to?.split('/');
const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1]; const isActive = slug && split && split[split.length - 1] === slug[slug.length - 1];
const isSectionActive = openSections[id]; const index = openSections[id] ? 0 : -1;
return ( return (
<Accordion key={id} index={isSectionActive ? 0 : -1} allowToggle mt='0 !important'> <Accordion key={id} index={isSectionActive ? 0 : -1} allowToggle mt='0 !important'>

Loading…
Cancel
Save