diff --git a/src/app/(pages)/mojang/page.tsx b/src/app/(pages)/mojang/page.tsx index 5f3cc9a..c0b4059 100644 --- a/src/app/(pages)/mojang/page.tsx +++ b/src/app/(pages)/mojang/page.tsx @@ -1,6 +1,7 @@ import { Card } from "@/app/components/card"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/app/components/ui/table"; import { generateEmbed } from "@/common/embed"; +import { capitalizeFirstLetter } from "@/common/string-utils"; import { cn } from "@/common/utils"; import { getMojangEndpointStatus } from "mcutils-library"; import { CachedEndpointStatus } from "mcutils-library/dist/types/cache/cachedEndpointStatus"; @@ -26,6 +27,16 @@ function getColor(status: any): string { } } +/** + * Formats the status + * + * @param status the status of the endpoint + * @returns the formatted status + */ +function formatStatus(status: any): string { + return capitalizeFirstLetter(status.toLowerCase()); +} + async function getData(): Promise { const status = await getMojangEndpointStatus(); return status; @@ -36,7 +47,7 @@ export async function generateMetadata(): Promise { const description = Object.entries(endpoints) .map(([url, status]) => { - return `${url}: ${status}`; + return `**${url}**: ${formatStatus(status)}`; }) .join("\n"); @@ -75,7 +86,9 @@ export default async function Page(): Promise { {url} - {status} + + {formatStatus(status)} + ); })}