Skip to content

Commit

Permalink
fix(docs): fix navigation highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-karger committed Apr 22, 2024
1 parent 83814d8 commit 52ed04a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions apps/docs/src/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { cn } from "~/lib/utils"

export default function Sidebar() {
const location = useLocation()
const pathname = location.pathname

return (
<aside class="hidden w-full md:block">
Expand All @@ -23,7 +22,7 @@ export default function Sidebar() {
href={item.href}
class={cn(
"group flex w-full items-center rounded-md border border-transparent px-2 py-1 no-underline hover:underline",
pathname === item.href
item.href === location.pathname
? "font-medium text-foreground"
: "text-muted-foreground"
)}
Expand Down

0 comments on commit 52ed04a

Please sign in to comment.