aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/components/PlayerProfile.tsx
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-19 05:21:58 +0900
committernsfisis <nsfisis@gmail.com>2024-08-19 05:35:24 +0900
commit19fad1b969ac9b6c50b024a2c710e8f4fe792eb0 (patch)
tree3fe237c1bee168eec088e125ba3877249aa09510 /frontend/app/components/PlayerProfile.tsx
parent6031c81f5394acf315b277302a7fd18ea288b506 (diff)
downloadiosdc-japan-2024-albatross-19fad1b969ac9b6c50b024a2c710e8f4fe792eb0.tar.gz
iosdc-japan-2024-albatross-19fad1b969ac9b6c50b024a2c710e8f4fe792eb0.tar.zst
iosdc-japan-2024-albatross-19fad1b969ac9b6c50b024a2c710e8f4fe792eb0.zip
feat(frontend): improve play/watch pages styling
Diffstat (limited to 'frontend/app/components/PlayerProfile.tsx')
-rw-r--r--frontend/app/components/PlayerProfile.tsx27
1 files changed, 27 insertions, 0 deletions
diff --git a/frontend/app/components/PlayerProfile.tsx b/frontend/app/components/PlayerProfile.tsx
new file mode 100644
index 0000000..675d77b
--- /dev/null
+++ b/frontend/app/components/PlayerProfile.tsx
@@ -0,0 +1,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>
+ );
+}