feat(dashboard): shipping & location (#7151)

This commit is contained in:
Frane Polić
2024-05-03 11:51:55 +02:00
committed by GitHub
parent c41e90fa36
commit e42308557e
74 changed files with 2401 additions and 1157 deletions
@@ -144,11 +144,6 @@ const useCoreRoutes = (): Omit<NavItemProps, "pathname">[] => {
label: t("pricing.domain"),
to: "/pricing",
},
{
icon: <Envelope />,
label: t("shipping.domain"),
to: "/shipping",
},
]
}
@@ -58,7 +58,8 @@ export const NavItem = ({
"text-ui-fg-subtle hover:text-ui-fg-base transition-fg hover:bg-ui-bg-subtle-hover flex items-center gap-x-2 rounded-md px-2 py-2.5 outline-none md:py-1.5",
{
"bg-ui-bg-base hover:bg-ui-bg-base-hover shadow-elevation-card-rest":
location.pathname.startsWith(to),
location.pathname === to ||
location.pathname.startsWith(to + "/"), // TODO: utilise `NavLink` and `end` prop instead of this manual check
"max-md:hidden": items && items.length > 0,
}
)}
@@ -57,6 +57,10 @@ const useSettingRoutes = (): NavItemProps[] => {
label: t("shippingProfile.domain"),
to: "/settings/shipping-profiles",
},
{
label: t("shipping.domain"),
to: "/settings/shipping",
},
],
[t]
)