mirror of
https://github.com/walkxcode/dashboard-icons.git
synced 2025-10-27 05:29:03 +08:00
feat: Add website (#1157)
Co-authored-by: Bjorn Lammers <bjorn@lammers.media>
This commit is contained in:
28
web/src/components/header-nav.tsx
Normal file
28
web/src/components/header-nav.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
"use client"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
import Link from "next/link"
|
||||
import { usePathname } from "next/navigation"
|
||||
|
||||
export function HeaderNav() {
|
||||
const pathname = usePathname()
|
||||
const isIconsActive = pathname === "/icons" || pathname.startsWith("/icons/")
|
||||
|
||||
return (
|
||||
<nav className="flex items-center gap-2 md:gap-6">
|
||||
<Link
|
||||
href="/"
|
||||
className={cn("text-sm font-medium transition-colors hover:text-primary", pathname === "/" && "text-primary font-semibold")}
|
||||
>
|
||||
Home
|
||||
</Link>
|
||||
<Link
|
||||
prefetch
|
||||
href="/icons"
|
||||
className={cn("text-sm font-medium transition-colors hover:text-primary", isIconsActive && "text-primary font-semibold")}
|
||||
>
|
||||
Icons
|
||||
</Link>
|
||||
</nav>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user