The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
chore: v2.0.0-canary.51
vholik36180338847c
diff --git a/packages/admin/package.json b/packages/admin/package.jsonindex 01f7dd991..526b6e0a3 100644--- a/packages/admin/package.json+++ b/packages/admin/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/admin",- "version": "2.0.0-canary.50",+ "version": "2.0.0-canary.51","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",diff --git a/packages/admin/src/components/layout/nav-item/nav-item.tsx b/packages/admin/src/components/layout/nav-item/nav-item.tsxindex 8af28a6e0..0f8fd5606 100644--- a/packages/admin/src/components/layout/nav-item/nav-item.tsx+++ b/packages/admin/src/components/layout/nav-item/nav-item.tsx@@ -115,6 +115,16 @@ export const NavItem = ({}) => {if (["core", "setting"].includes(type)) {isActive = pathname.startsWith(to);++ // If a nested item's path matches, the parent should not be active+ if (isActive && !isNested && items?.length) {+ const nestedMatch = items.some((item) =>+ pathname.startsWith(item.to),+ );+ if (nestedMatch) {+ isActive = false;+ }+ }}return clx(BASE_NAV_LINK_CLASSES, {@@ -123,7 +133,7 @@ export const NavItem = ({[SETTING_NAV_LINK_CLASSES]: isSetting,});},- [type, pathname],+ [type, pathname, items],);const isSetting = type === "setting";diff --git a/packages/cli/package.json b/packages/cli/package.jsonindex ee7a8eca1..31b6f101f 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/cli",- "version": "2.0.0-canary.50",+ "version": "2.0.0-canary.51","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",diff --git a/packages/client/package.json b/packages/client/package.jsonindex a840655b5..c323f9c73 100644--- a/packages/client/package.json+++ b/packages/client/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/client",- "version": "2.0.0-canary.50",+ "version": "2.0.0-canary.51","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",diff --git a/packages/core-plugin/package.json b/packages/core-plugin/package.jsonindex 455fb1e27..93aed6882 100644--- a/packages/core-plugin/package.json+++ b/packages/core-plugin/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/core-plugin",- "version": "2.0.0-canary.50",+ "version": "2.0.0-canary.51","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",diff --git a/packages/dashboard-sdk/package.json b/packages/dashboard-sdk/package.jsonindex 8dfffd0b3..4eca6578f 100644--- a/packages/dashboard-sdk/package.json+++ b/packages/dashboard-sdk/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/dashboard-sdk",- "version": "2.0.0-canary.50",+ "version": "2.0.0-canary.51","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",diff --git a/packages/dashboard-shared/package.json b/packages/dashboard-shared/package.jsonindex bcb0f4db1..91443b0db 100644--- a/packages/dashboard-shared/package.json+++ b/packages/dashboard-shared/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/dashboard-shared",- "version": "2.0.0-canary.50",+ "version": "2.0.0-canary.51","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",diff --git a/packages/types/package.json b/packages/types/package.jsonindex 425c0e258..f7d5c100a 100644--- a/packages/types/package.json+++ b/packages/types/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/types",- "version": "2.0.0-canary.50",+ "version": "2.0.0-canary.51","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",diff --git a/packages/vendor/package.json b/packages/vendor/package.jsonindex a7c5ae3d1..4b36ec828 100644--- a/packages/vendor/package.json+++ b/packages/vendor/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/vendor",- "version": "2.0.0-canary.50",+ "version": "2.0.0-canary.51","repository": {"type": "git","url": "https://github.com/mercurjs/mercur",diff --git a/packages/vendor/src/components/layout/nav-item/nav-item.tsx b/packages/vendor/src/components/layout/nav-item/nav-item.tsxindex 6b79a7eb7..7d3ebb3bd 100644--- a/packages/vendor/src/components/layout/nav-item/nav-item.tsx+++ b/packages/vendor/src/components/layout/nav-item/nav-item.tsx@@ -119,6 +119,16 @@ export const NavItem = ({}) => {if (["core", "setting"].includes(type)) {isActive = pathname.startsWith(to)++ // If a nested item's path matches, the parent should not be active+ if (isActive && !isNested && items?.length) {+ const nestedMatch = items.some((item) =>+ pathname.startsWith(item.to)+ )+ if (nestedMatch) {+ isActive = false+ }+ }}return clx(BASE_NAV_LINK_CLASSES, {@@ -127,7 +137,7 @@ export const NavItem = ({[SETTING_NAV_LINK_CLASSES]: isSetting,})},- [type, pathname]+ [type, pathname, items])const isSetting = type === "setting"