add api button in the navbar
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m1s

This commit is contained in:
Lee 2024-04-18 01:45:27 +01:00
parent 590d9cfaff
commit 9255c40288

@ -6,12 +6,14 @@ import { ToggleThemeButton } from "./theme-toggle-button";
type Page = {
title: string;
url: string;
openInNewTab?: boolean;
};
const pages: Page[] = [
{ title: "Player", url: "/player" },
{ title: "Server", url: "/server/java" },
{ title: "Mojang", url: "/mojang/status" },
{ title: "API", url: "https://api.mcutils.xyz", openInNewTab: true },
];
export default function NavBar(): JSX.Element {
@ -22,7 +24,7 @@ export default function NavBar(): JSX.Element {
<p className="hidden xs:block">Minecraft Utilities</p>
</Link>
{pages.map((page, index) => {
return <RedirectButton key={index} title={page.title} url={page.url} />;
return <RedirectButton key={index} title={page.title} url={page.url} openInNewTab={page.openInNewTab} />;
})}
<div className="flex-grow"></div>