Frontend/src/components/navbar.tsx

35 lines
832 B
TypeScript
Raw Normal View History

2024-04-14 17:46:37 +00:00
import Link from "next/link";
import Logo from "./logo";
type Page = {
title: string;
url: string;
};
const pages: Page[] = [
{ title: "Player", url: "/player" },
2024-04-14 20:56:07 +00:00
{ title: "Server", url: "/server" },
2024-04-14 17:46:37 +00:00
];
export default function NavBar() {
return (
2024-04-14 18:08:24 +00:00
<div className="bg-secondary w-full rounded-lg flex items-center gap-3 mt-2 bg-opacity-85">
2024-04-14 17:52:50 +00:00
<div className="flex items-center gap-2 pl-3 pr-3">
2024-04-14 17:46:37 +00:00
<Logo />
<Link href="/">
<p>Minecraft Utilities</p>
</Link>
</div>
{pages.map((page, index) => {
return (
<div key={index} className="pt-4 pb-4 w-fit rounded-lg">
<Link href={page.url}>
<p className="hover:text-primary transition-all">{page.title}</p>
</Link>
</div>
);
})}
</div>
);
}