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