2024-04-14 17:46:37 +00:00
|
|
|
import Link from "next/link";
|
|
|
|
import Logo from "./logo";
|
2024-04-16 18:27:48 +00:00
|
|
|
import { RedirectButton } from "./rediect-button";
|
2024-04-16 20:18:08 +00:00
|
|
|
import { ToggleThemeButton } from "./theme-toggle-button";
|
2024-04-14 17:46:37 +00:00
|
|
|
|
|
|
|
type Page = {
|
|
|
|
title: string;
|
|
|
|
url: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
const pages: Page[] = [
|
2024-04-16 16:54:22 +00:00
|
|
|
{ title: "Player", url: "/player/Notch" },
|
|
|
|
{ title: "Server", url: "/server/java/hypixel.net" },
|
2024-04-16 21:50:42 +00:00
|
|
|
{ title: "Mojang", url: "/mojang" },
|
2024-04-14 17:46:37 +00:00
|
|
|
];
|
|
|
|
|
2024-04-16 20:18:08 +00:00
|
|
|
export default function NavBar(): JSX.Element {
|
2024-04-14 17:46:37 +00:00
|
|
|
return (
|
2024-04-16 18:27:48 +00:00
|
|
|
<div className="bg-secondary w-full rounded-lg flex items-center gap-3 mt-2 bg-opacity-85 h-12">
|
2024-04-16 21:08:31 +00:00
|
|
|
<Link href="/" className="flex items-center gap-2 pl-3 pr-1">
|
2024-04-14 17:46:37 +00:00
|
|
|
<Logo />
|
2024-04-16 21:07:43 +00:00
|
|
|
<p className="hidden xs:block">Minecraft Utilities</p>
|
|
|
|
</Link>
|
2024-04-14 17:46:37 +00:00
|
|
|
{pages.map((page, index) => {
|
2024-04-16 18:27:48 +00:00
|
|
|
return <RedirectButton key={index} title={page.title} url={page.url} />;
|
2024-04-14 17:46:37 +00:00
|
|
|
})}
|
2024-04-16 18:27:48 +00:00
|
|
|
|
|
|
|
<div className="flex-grow"></div>
|
|
|
|
|
2024-04-16 20:18:08 +00:00
|
|
|
<div className="mr-4 flex items-center gap-2">
|
2024-04-16 21:50:42 +00:00
|
|
|
<div className="hidden md:block">
|
2024-04-16 20:40:56 +00:00
|
|
|
<RedirectButton
|
|
|
|
title="Star us on Github!"
|
|
|
|
url="https://github.com/RealFascinated/minecraft-helper"
|
|
|
|
openInNewTab
|
|
|
|
/>
|
|
|
|
</div>
|
2024-04-16 20:18:08 +00:00
|
|
|
<ToggleThemeButton />
|
2024-04-16 18:27:48 +00:00
|
|
|
</div>
|
2024-04-14 17:46:37 +00:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|