Update some errors
All checks were successful
Deploy Frontend / docker (17, 3.8.5) (push) Successful in 1m0s

This commit is contained in:
Braydon 2024-04-18 20:42:35 -04:00
parent bf1c1af0e5
commit 6fa05990c6
3 changed files with 17 additions and 14 deletions

@ -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({

@ -62,7 +62,7 @@ const PlayerResult = ({
<div className="flex gap-5 items-center">
{/* Player Head */}
<Image
className="w-24 h-24 sm:w-28 sm:h-28 md:w-32 md:h-32"
className="w-24 h-24 sm:w-28 sm:h-28 md:w-32 md:h-32 pointer-events-none"
src={parts.HEAD}
alt={`${username}'s Head`}
width={128}

@ -1,6 +1,6 @@
import { cn } from "@/lib/utils";
import Image from "next/image";
import { ReactNode } from "react";
import { ReactElement, ReactNode } from "react";
import {
CachedBedrockMinecraftServer,
CachedJavaMinecraftServer,
@ -23,13 +23,13 @@ type ServerResultProps = {
* @param server the server to display
* @returns the server result jsx
*/
const ServerResult = ({ server }: ServerResultProps): ReactNode => {
const ServerResult = ({ server }: ServerResultProps): ReactElement => {
const favicon: string | undefined = (server as CachedJavaMinecraftServer)
.favicon?.url; // The favicon of the server (TODO: bedrock)
return (
<div
className={cn(
"w-[29rem] relative p-2 flex gap-2 rounded-lg",
"w-[29rem] relative p-2 flex gap-2 rounded-lg pointer-events-none",
'bg-[url("/media/server-background.png")]'
)}
>
@ -44,14 +44,17 @@ const ServerResult = ({ server }: ServerResultProps): ReactNode => {
{/* Name & MOTD */}
<div className="flex flex-col">
<h1>{server.hostname}</h1>
{server.motd.html.map((line, index) => {
return (
<p
key={index}
dangerouslySetInnerHTML={{ __html: line }}
></p>
);
})}
{server.motd.html.map(
(line: string, index: number): ReactElement => {
return (
<p
key={index}
className="pointer-events-auto"
dangerouslySetInnerHTML={{ __html: line }}
></p>
);
}
)}
</div>
{/* Ping */}