fix: third level navigation links
This commit is contained in:
parent
dc28ece83d
commit
2bd0b55ad7
2 changed files with 6 additions and 8 deletions
|
|
@ -35,6 +35,7 @@ const Link = ({
|
|||
const [isActive] = useRoute(props.to)
|
||||
const isParentActive = isParent && location.startsWith(props.to)
|
||||
if (isActive || isParentActive) setActive(item)
|
||||
console.log(location, isParentActive, isParent, location.startsWith(props.to))
|
||||
|
||||
const classNames = classnames({
|
||||
[className]: true,
|
||||
|
|
@ -63,6 +64,7 @@ const Subheader = ({ item, user }) => {
|
|||
<Link
|
||||
to={it.route}
|
||||
state={{ prev }}
|
||||
isParent={it.children?.length}
|
||||
className={styles.subheaderLink}
|
||||
activeClassName={styles.activeSubheaderLink}
|
||||
item={it.route}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue