|
|
|
@ -9,7 +9,7 @@ import { |
|
|
|
|
Stack, |
|
|
|
|
Text |
|
|
|
|
} from '@chakra-ui/react'; |
|
|
|
|
import { AddIcon, MinusIcon } from '../svgs/' |
|
|
|
|
import { AddIcon, MinusIcon } from '../svgs/'; |
|
|
|
|
import NextLink from 'next/link'; |
|
|
|
|
import { useRouter } from 'next/router'; |
|
|
|
|
|
|
|
|
@ -27,7 +27,7 @@ export const DocsLinks: FC<Props> = ({ navLinks }) => { |
|
|
|
|
return ( |
|
|
|
|
<Stack border='2px' borderColor='primary'> |
|
|
|
|
{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]; |
|
|
|
|
return ( |
|
|
|
|
<Accordion key={id} allowToggle mt='0 !important' defaultIndex={[0]}> |
|
|
|
@ -52,7 +52,7 @@ export const DocsLinks: FC<Props> = ({ navLinks }) => { |
|
|
|
|
_groupHover={{ background: 'primary', color: 'bg', textDecoration: 'none' }} |
|
|
|
|
> |
|
|
|
|
{to ? ( |
|
|
|
|
<NextLink href={to} passHref> |
|
|
|
|
<NextLink href={to} passHref legacyBehavior> |
|
|
|
|
<Link textDecoration='none !important'> |
|
|
|
|
<Text |
|
|
|
|
textStyle='docs-nav-dropdown' |
|
|
|
@ -62,7 +62,7 @@ export const DocsLinks: FC<Props> = ({ navLinks }) => { |
|
|
|
|
verticalAlign: '-1.25px', |
|
|
|
|
marginInlineEnd: 2, |
|
|
|
|
fontSize: 'lg', |
|
|
|
|
display: isActive ? 'unset' : 'none', |
|
|
|
|
display: isActive ? 'unset' : 'none' |
|
|
|
|
}} |
|
|
|
|
_groupHover={{ color: 'bg' }} |
|
|
|
|
> |
|
|
|
@ -100,4 +100,4 @@ export const DocsLinks: FC<Props> = ({ navLinks }) => { |
|
|
|
|
})} |
|
|
|
|
</Stack> |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|