Spaces:
Running
Running
File size: 1,236 Bytes
f3d88e5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
"use client";
import { useTheme } from "next-themes";
import Image from "next/image";
import Link from "next/link";
const Navbar = () => {
const { theme } = useTheme();
const links = [
{ name: "Home", href: "#" },
{ name: "About", href: "#" },
{ name: "Projects", href: "#" },
{ name: "Testimonials", href: "#" },
{ name: "Contact", href: "#" },
];
return (
<nav className="hidden flex-col gap-6 w-full text-lg font-medium md:flex md:flex-row md:items-center md:gap-5 md:text-sm lg:gap-6">
<Link
href="#"
className="flex items-center justify-start gap-2 text-lg h-12 w-12"
>
<Image
src={theme === "dark" ? "/logo-white.png" : "/logo.png"}
width={48}
height={48}
alt="logo"
/>
<span className="sr-only">ATOM</span>
</Link>
<div className="flex items-center justify-center gap-2 w-full">
{links.map((link) => (
<Link
key={link.name}
href={link.href}
className="text-muted-foreground transition-colors hover:text-foreground"
>
{link.name}
</Link>
))}
</div>
</nav>
);
};
export default Navbar;
|