/* eslint-disable @next/next/no-img-element */ import Image from "next/image"; import Link from "next/link"; import { CachedPlayer, SkinPart } from "restfulmc-lib"; /** * The result of a player search. * * @param player the player to display * @returns the player result jsx */ const PlayerResult = ({ player: { uniqueId, username, skin: { parts }, legacy, }, }: { player: CachedPlayer; }): JSX.Element => (
{/* Details */}
{/* Player Head */} {`${username}'s {/* Name, Unique ID, and Badges */}

{username}

{uniqueId} {/* Legacy Badge */} {legacy &&

Legacy

}
{/* Skin Parts */}
{/* Header */}

Skin Parts

{/* Skin Parts */}
{Object.entries(parts) .filter( ([part]) => part === SkinPart.HEAD || part === SkinPart.FACE || part === SkinPart.BODY_FLAT ) .map(([part, url], index) => ( {`${username}'s ))}
); export default PlayerResult;