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