Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Fix menu indicator

dominik-zeglen015223123798
diff --git a/saleor/static/dashboard-next/components/AppLayout/MenuList.tsx b/saleor/static/dashboard-next/components/AppLayout/MenuList.tsx
index 7086453e0f..c1c4d88b01 100644
--- a/saleor/static/dashboard-next/components/AppLayout/MenuList.tsx
+++ b/saleor/static/dashboard-next/components/AppLayout/MenuList.tsx
@@ -99,13 +99,15 @@ const MenuList = withStyles(styles, { name: "MenuList" })(
onMenuItemClick
}: MenuListProps & WithStyles<typeof styles>) => (
<div className={className}>
+ {/* FIXME: this .split("?")[0] looks gross */}
{menuItems.map(menuItem => {
const isActive = (menuItem: IMenuItem) =>
- location === orderDraftListUrl() && menuItem.url === orderListUrl()
+ location.split("?")[0] === orderDraftListUrl().split("?")[0] &&
+ menuItem.url.split("?")[0] === orderListUrl().split("?")[0]
? false
- : !!matchPath(location, {
- exact: menuItem.url === "/",
- path: menuItem.url
+ : !!matchPath(location.split("?")[0], {
+ exact: menuItem.url.split("?")[0] === "/",
+ path: menuItem.url.split("?")[0]
});
if (