import { HomeIcon } from "@heroicons/react/24/solid";
import { MagnifyingGlassIcon } from "@radix-ui/react-icons";
import Link from "next/link";
import React from "react";
import NavbarButton from "./navbar-button";
import ProfileButton from "./profile-button";
type NavbarItem = {
name: string;
link: string;
icon: React.ReactNode;
};
const items: NavbarItem[] = [
{
name: "Home",
link: "/",
icon: , // Add your home icon here
},
{
name: "Search",
link: "/search",
icon: , // Add your search icon here
},
];
// Helper function to render each navbar item
const renderNavbarItem = (item: NavbarItem) => (
{item.icon &&
{item.icon}
}
{item.name}
);
export default function Navbar() {
return (
{/* Left-aligned items */}
{items.slice(0, -1).map((item, index) => (
{renderNavbarItem(item)}
))}
{/* Right-aligned item */}
{renderNavbarItem(items[items.length - 1])}
);
}