update error messages
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 55s
All checks were successful
Deploy App / docker (ubuntu-latest) (push) Successful in 55s
This commit is contained in:
parent
b939f9b807
commit
baddd1f684
@ -16,7 +16,7 @@ type Params = {
|
|||||||
export async function generateMetadata({ params: { id } }: Params): Promise<Metadata> {
|
export async function generateMetadata({ params: { id } }: Params): Promise<Metadata> {
|
||||||
const player = await getData(id);
|
const player = await getData(id);
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
return generateEmbed({ title: "Unknown Player", description: "Player not found" });
|
return generateEmbed({ title: "Unknown Player", description: "Invalid UUID / Username" });
|
||||||
}
|
}
|
||||||
|
|
||||||
const { username, uniqueId, skin } = player;
|
const { username, uniqueId, skin } = player;
|
||||||
@ -55,7 +55,7 @@ export default async function Page({ params }: Params) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Card>
|
<Card>
|
||||||
{player == null && <NotFound message="Player not found" />}
|
{player == null && <NotFound message="Invalid UUID / Username" />}
|
||||||
{player != null && (
|
{player != null && (
|
||||||
<div className="flex gap-2 flex-col md:flex-row">
|
<div className="flex gap-2 flex-col md:flex-row">
|
||||||
<div className="flex justify-center md:justify-start">
|
<div className="flex justify-center md:justify-start">
|
||||||
|
@ -20,7 +20,7 @@ type Params = {
|
|||||||
export async function generateMetadata({ params: { platform, hostname } }: Params): Promise<Metadata> {
|
export async function generateMetadata({ params: { platform, hostname } }: Params): Promise<Metadata> {
|
||||||
const server = await getData(platform, hostname);
|
const server = await getData(platform, hostname);
|
||||||
if (server == null) {
|
if (server == null) {
|
||||||
return generateEmbed({ title: "Unknown Server", description: "Server not found" });
|
return generateEmbed({ title: "Unknown Server", description: "Server not responding" });
|
||||||
}
|
}
|
||||||
|
|
||||||
const { hostname: serverHostname, players } = server;
|
const { hostname: serverHostname, players } = server;
|
||||||
@ -75,7 +75,7 @@ export default async function Page({ params: { platform, hostname } }: Params) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Card>
|
<Card>
|
||||||
{server == null && <NotFound message="Server not found" />}
|
{server == null && <NotFound message="Server not responding" />}
|
||||||
{server != null && (
|
{server != null && (
|
||||||
<div className="flex gap-2 flex-col md:flex-row">
|
<div className="flex gap-2 flex-col md:flex-row">
|
||||||
{favicon && (
|
{favicon && (
|
||||||
|
@ -29,9 +29,9 @@ export function LookupPlayer() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex gap-2 justify-center mt-2">
|
<form className="flex gap-2 justify-center mt-2">
|
||||||
<Input className="w-fit" placeholder="Player UUID / Username" value={player} onChange={setPlayerValue} />
|
<Input className="w-fit" placeholder="Player UUID / Username" value={player} onChange={setPlayerValue} />
|
||||||
<Button onClick={() => lookupPlayer()}>Lookup</Button>
|
<Button onClick={() => lookupPlayer()}>Lookup</Button>
|
||||||
</div>
|
</form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -32,10 +32,10 @@ export function LookupServer() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex gap-2 justify-center mt-2">
|
<form className="flex gap-2 justify-center mt-2">
|
||||||
<Input className="w-fit" placeholder="Server hostname" value={hostname} onChange={setHostnameValue} />
|
<Input className="w-fit" placeholder="Server hostname" value={hostname} onChange={setHostnameValue} />
|
||||||
<Button onClick={() => lookupServer(ServerPlatform.Java)}>Java</Button>
|
<Button onClick={() => lookupServer(ServerPlatform.Java)}>Java</Button>
|
||||||
<Button onClick={() => lookupServer(ServerPlatform.Bedrock)}>Bedrock</Button>
|
<Button onClick={() => lookupServer(ServerPlatform.Bedrock)}>Bedrock</Button>
|
||||||
</div>
|
</form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user