mirror of
https://github.com/jambonz/next-static-site.git
synced 2026-07-24 13:02:22 +00:00
Merge pull request #7 from jambonz/bugfix/docs-active-items
Fix bug where docs submenu items with same slug get active state
This commit is contained in:
@@ -57,7 +57,7 @@ function Sidebar({data}) {
|
||||
</div>
|
||||
<ul className={classNames(subClasses)}>
|
||||
{item.pages.map((page) => {
|
||||
const isActiveItem = (parsedPath === page.path);
|
||||
const isActiveItem = (parsedPath === page.path && parsedTab === item.path) && isActiveToggle;
|
||||
const itemClasses = {
|
||||
'ms': true,
|
||||
'active': isActiveItem,
|
||||
|
||||
Reference in New Issue
Block a user