From 6fa05990c65e4a3e8e2170fd6de5b1b3b1e145ab Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Thu, 18 Apr 2024 20:42:35 -0400 Subject: [PATCH] Update some errors --- .../app/(pages)/server/[[...slug]]/page.tsx | 4 +-- .../app/components/player/player-result.tsx | 2 +- .../app/components/server/server-result.tsx | 25 +++++++++++-------- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Frontend/src/app/(pages)/server/[[...slug]]/page.tsx b/Frontend/src/app/(pages)/server/[[...slug]]/page.tsx index 1ed4f0a..491ddc6 100644 --- a/Frontend/src/app/(pages)/server/[[...slug]]/page.tsx +++ b/Frontend/src/app/(pages)/server/[[...slug]]/page.tsx @@ -110,9 +110,9 @@ export const generateMetadata = async ({ const code: number = (err as RestfulMCAPIError).code; // Get the error status code if (code === 400) { return Embed({ - title: "Invalid Hostname", + title: "Invalid Platform or Hostname", color: "#EB4034", - description: `The hostname ${hostname} is invalid.`, + description: `The platform ${platform} or hostname ${hostname} is invalid.`, }); } else if (code === 404) { return Embed({ diff --git a/Frontend/src/app/components/player/player-result.tsx b/Frontend/src/app/components/player/player-result.tsx index 884863c..2ac2026 100644 --- a/Frontend/src/app/components/player/player-result.tsx +++ b/Frontend/src/app/components/player/player-result.tsx @@ -62,7 +62,7 @@ const PlayerResult = ({
{/* Player Head */} {`${username}'s { +const ServerResult = ({ server }: ServerResultProps): ReactElement => { const favicon: string | undefined = (server as CachedJavaMinecraftServer) .favicon?.url; // The favicon of the server (TODO: bedrock) return (
@@ -44,14 +44,17 @@ const ServerResult = ({ server }: ServerResultProps): ReactNode => { {/* Name & MOTD */}

{server.hostname}

- {server.motd.html.map((line, index) => { - return ( -

- ); - })} + {server.motd.html.map( + (line: string, index: number): ReactElement => { + return ( +

+ ); + } + )}
{/* Ping */}