From 922bc6a1f52d8f01600e9a61ce31963075ec59a5 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Thu, 22 Aug 2024 00:46:06 +0900
Subject: refactor(frontend): organize PlayerInfo

---
 .../components/GolfWatchApps/GolfWatchAppWaiting.tsx   | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

(limited to 'frontend/app/components/GolfWatchApps/GolfWatchAppWaiting.tsx')

diff --git a/frontend/app/components/GolfWatchApps/GolfWatchAppWaiting.tsx b/frontend/app/components/GolfWatchApps/GolfWatchAppWaiting.tsx
index faa9485..0e964e3 100644
--- a/frontend/app/components/GolfWatchApps/GolfWatchAppWaiting.tsx
+++ b/frontend/app/components/GolfWatchApps/GolfWatchAppWaiting.tsx
@@ -1,18 +1,16 @@
-import { PlayerInfo as FullPlayerInfo } from "../../models/PlayerInfo";
-import PlayerProfile from "../PlayerProfile";
-
-type PlayerInfo = Pick<FullPlayerInfo, "displayName" | "iconPath">;
+import type { PlayerProfile } from "../../types/PlayerProfile";
+import PlayerNameAndIcon from "../PlayerNameAndIcon";
 
 type Props = {
 	gameDisplayName: string;
-	playerInfoA: PlayerInfo;
-	playerInfoB: PlayerInfo;
+	playerProfileA: PlayerProfile;
+	playerProfileB: PlayerProfile;
 };
 
 export default function GolfWatchAppWaiting({
 	gameDisplayName,
-	playerInfoA,
-	playerInfoB,
+	playerProfileA,
+	playerProfileB,
 }: Props) {
 	return (
 		<div className="min-h-screen bg-gray-100 flex flex-col font-bold text-center">
@@ -20,9 +18,9 @@ export default function GolfWatchAppWaiting({
 				<div className="text-4xl">{gameDisplayName}</div>
 			</div>
 			<div className="grow grid grid-cols-3 gap-10 mx-auto text-black">
-				<PlayerProfile playerInfo={playerInfoA} label="Player 1" />
+				<PlayerNameAndIcon label="Player 1" profile={playerProfileA} />
 				<div className="text-8xl my-auto">vs.</div>
-				<PlayerProfile playerInfo={playerInfoB} label="Player 2" />
+				<PlayerNameAndIcon label="Player 2" profile={playerProfileB} />
 			</div>
 		</div>
 	);
-- 
cgit v1.3.1

