blob: 675d77bfcedf66e3a1a0356ddb42fd6ce8282ef9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import { PlayerInfo as FullPlayerInfo } from "../models/PlayerInfo";
import UserIcon from "./UserIcon";
type PlayerInfo = Pick<FullPlayerInfo, "displayName" | "iconPath">;
type Props = {
playerInfo: PlayerInfo;
label: string;
};
export default function PlayerProfile({ playerInfo, label }: Props) {
return (
<div className="flex flex-col gap-6 my-auto">
<div className="flex flex-col gap-2">
<div className="text-4xl">{label}</div>
<div className="text-6xl">{playerInfo.displayName}</div>
</div>
{playerInfo.iconPath && (
<UserIcon
iconPath={playerInfo.iconPath}
displayName={playerInfo.displayName!}
className="w-48 h-48"
/>
)}
</div>
);
}
|