added heroicons to nav
This commit is contained in:
parent
c027c645db
commit
031cd6e2bb
1 changed files with 17 additions and 2 deletions
|
|
@ -1,6 +1,11 @@
|
|||
"use client"
|
||||
import {
|
||||
Button,
|
||||
BriefcaseIcon,
|
||||
EnvelopeIcon,
|
||||
HomeIcon,
|
||||
UsersIcon,
|
||||
} from "@heroicons/react/24/outline"
|
||||
import {
|
||||
Navbar,
|
||||
NavbarBrand,
|
||||
NavbarContent,
|
||||
|
|
@ -9,11 +14,13 @@ import {
|
|||
NavbarMenuItem,
|
||||
NavbarMenuToggle,
|
||||
} from "@nextui-org/react"
|
||||
|
||||
import Image from "next/image"
|
||||
import Link from "next/link"
|
||||
import { usePathname } from "next/navigation"
|
||||
import { useState } from "react"
|
||||
|
||||
|
||||
export default function Nav() {
|
||||
const [isMenuOpen, setIsMenuOpen] = useState<boolean | undefined>(false)
|
||||
const currentRoute = usePathname()
|
||||
|
|
@ -23,21 +30,26 @@ export default function Nav() {
|
|||
label: "Home",
|
||||
href: "/",
|
||||
current: currentRoute === "/",
|
||||
icon: <HomeIcon className="h-6 w-6"/>
|
||||
},
|
||||
{
|
||||
label: "Team",
|
||||
href: "/team",
|
||||
current: currentRoute === "/team",
|
||||
icon: <UsersIcon className="h-6 w-6"/>
|
||||
|
||||
},
|
||||
{
|
||||
label: "Services",
|
||||
href: "/services",
|
||||
current: currentRoute === "/services",
|
||||
icon: <BriefcaseIcon className="h-6 w-6"/>
|
||||
},
|
||||
{
|
||||
label: "Contact",
|
||||
href: "/contact",
|
||||
current: currentRoute === "/contact",
|
||||
icon: <EnvelopeIcon className="h-6 w-6"/>
|
||||
},
|
||||
]
|
||||
|
||||
|
|
@ -59,7 +71,10 @@ export default function Nav() {
|
|||
aria-current={item.current ? "page" : undefined}
|
||||
onClick={() => setIsMenuOpen(false)}
|
||||
>
|
||||
{item.label}
|
||||
<div className="flex-row items-center flex m-4 space-x-2">
|
||||
{item.icon}
|
||||
<span>{item.label}</span>
|
||||
</div>
|
||||
</Link>
|
||||
</NavbarMenuItem>
|
||||
))}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue