Frontend/src/app/(pages)/page.tsx
Liam 6f0b3ec252
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 1m1s
update spacing on landing page
2024-04-18 01:48:30 +01:00

72 lines
2.1 KiB
TypeScript

import Link from "next/link";
import { Button } from "../components/ui/button";
import { Tooltip, TooltipContent, TooltipTrigger } from "../components/ui/tooltip";
import { Separator } from "../components/ui/separator";
import { ReactElement } from "react";
import { Stats } from "@/app/components/stats";
type Button = {
title: string;
tooltip: string;
url: string;
openInNewTab?: boolean;
};
const buttons: Button[] = [
{
title: "Get Started",
tooltip: "Click to view the Postman Collection",
url: "https://www.postman.com/imfascinated/workspace/minecraft-utilities",
openInNewTab: true,
},
{
title: "Documentation",
tooltip: "Click to open the documentation",
url: "https://api.mcutils.xyz/swagger-ui.html",
openInNewTab: true,
},
];
export default function Home(): ReactElement {
return (
<div className="text-center flex flex-col gap-4">
<div>
<h1 className="text-4xl mb-2">Minecraft Utilities</h1>
<div className="text-lg">
<p>Minecraft Utilities offers you many endpoints to get information about a minecraft server or a player.</p>
<p>We offer you a simple and easy to use API.</p>
</div>
</div>
<div className="flex flex-row gap-2 justify-center mt-4">
{buttons.map((button, index) => {
return (
<Tooltip key={index}>
<TooltipTrigger asChild>
<Button key={index}>
<Link href={button.url} target={button.openInNewTab ? "_blank" : ""}>
<p>{button.title}</p>
</Link>
</Button>
</TooltipTrigger>
<TooltipContent>
<p>{button.tooltip}</p>
</TooltipContent>
</Tooltip>
);
})}
</div>
<Separator className="mt-6 mb-6" />
<div className="flex flex-col gap-4 items-center">
<div className="text-center">
<p className="font-semibold text-xl">API Statistics</p>
<p>View the statistics for the API in real-time!</p>
</div>
<Stats />
</div>
</div>
);
}