fixed bug
This commit is contained in:
@@ -15,7 +15,9 @@ const SidebarListItems = ({ menuItem, dispatch }) => {
|
|||||||
component={menuItem.type === "page" ? Link : null}
|
component={menuItem.type === "page" ? Link : null}
|
||||||
href={menuItem.type === "page" ? menuItem.route : null}
|
href={menuItem.type === "page" ? menuItem.route : null}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
dispatch({ type: "COLLAPSE_MENU", id: menuItem.id });
|
if (menuItem.type !== "page") {
|
||||||
|
dispatch({ type: "COLLAPSE_MENU", id: menuItem.id });
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ListItemIcon
|
<ListItemIcon
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ const SidebarSubitems = ({ subitem, dispatch }) => {
|
|||||||
component={subitem.type === "page" ? Link : null}
|
component={subitem.type === "page" ? Link : null}
|
||||||
href={subitem.type === "page" ? subitem.route : null}
|
href={subitem.type === "page" ? subitem.route : null}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
dispatch({ type: "COLLAPSE_SUB_ITEMS", id: subitem.id });
|
if (subitem.type !== "page") {
|
||||||
|
dispatch({ type: "COLLAPSE_SUB_ITEMS", id: subitem.id });
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ListItemIcon
|
<ListItemIcon
|
||||||
|
|||||||
Reference in New Issue
Block a user