From 582084da88136f775d165f35c78cc88b515ebc46 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 18 Apr 2024 01:37:59 +0100 Subject: [PATCH] move stats to the main page --- src/app/(pages)/page.tsx | 26 ++++++++++++++++++++------ src/app/(pages)/stats/page.tsx | 21 --------------------- src/app/components/container.tsx | 2 +- 3 files changed, 21 insertions(+), 28 deletions(-) delete mode 100644 src/app/(pages)/stats/page.tsx diff --git a/src/app/(pages)/page.tsx b/src/app/(pages)/page.tsx index f0a0318..bdc21de 100644 --- a/src/app/(pages)/page.tsx +++ b/src/app/(pages)/page.tsx @@ -1,7 +1,9 @@ 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; @@ -27,14 +29,16 @@ const buttons: Button[] = [ export default function Home(): ReactElement { return ( -
-

Minecraft Utilities

-
-

Minecraft Utilities offers you many endpoints to get information about a minecraft server or a player.

-

We offer you a simple and easy to use API.

+
+
+

Minecraft Utilities

+
+

Minecraft Utilities offers you many endpoints to get information about a minecraft server or a player.

+

We offer you a simple and easy to use API.

+
-
+
{buttons.map((button, index) => { return ( @@ -52,6 +56,16 @@ export default function Home(): ReactElement { ); })}
+ + + +
+
+

API Statistics

+

View the statistics for the API in real-time!

+
+ +
); } diff --git a/src/app/(pages)/stats/page.tsx b/src/app/(pages)/stats/page.tsx deleted file mode 100644 index 77d2104..0000000 --- a/src/app/(pages)/stats/page.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { ReactElement } from "react"; -import { Stats } from "@/app/components/stats"; -import { Metadata } from "next"; - -export const metadata: Metadata = { - openGraph: { - description: "Click to view the API statistics", - }, -}; - -export default async function Page(): Promise { - return ( -
-
-

API Statistics

-

View the statistics for the API in real-time!

-
- -
- ); -} diff --git a/src/app/components/container.tsx b/src/app/components/container.tsx index 1256bb9..99b5b6a 100644 --- a/src/app/components/container.tsx +++ b/src/app/components/container.tsx @@ -8,7 +8,7 @@ export default function Container({ return (
-
{children}
+
{children}
); }