Skip to content

Commit

Permalink
fix: nav highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
fPolic committed May 3, 2024
1 parent f689f90 commit a23ab08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -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,
}
)}
Expand Down
@@ -1,4 +1,4 @@
import { ArrowUturnLeft, Envelope, MinusMini } from "@medusajs/icons"
import { ArrowUturnLeft, MinusMini } from "@medusajs/icons"
import { IconButton, Text } from "@medusajs/ui"
import * as Collapsible from "@radix-ui/react-collapsible"
import { useEffect, useMemo, useState } from "react"
Expand Down
Expand Up @@ -10,7 +10,6 @@ import {
import {
AdminCollectionsRes,
AdminProductsRes,
AdminPromotionRes,
AdminRegionsRes,
} from "@medusajs/medusa"
import { InventoryItemRes, PriceListRes } from "../../types/api-responses"
Expand Down

0 comments on commit a23ab08

Please sign in to comment.