From 922bc6a1f52d8f01600e9a61ce31963075ec59a5 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 22 Aug 2024 00:46:06 +0900 Subject: refactor(frontend): organize PlayerInfo --- .../GolfWatchApps/GolfWatchAppGaming.tsx | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx') diff --git a/frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx b/frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx index 28babff..a23a972 100644 --- a/frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx +++ b/frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx @@ -1,4 +1,4 @@ -import { PlayerInfo } from "../../models/PlayerInfo"; +import type { PlayerInfo } from "../../types/PlayerInfo"; import BorderedContainer from "../BorderedContainer"; import CodeBlock from "../Gaming/CodeBlock"; import ScoreBar from "../Gaming/ScoreBar"; @@ -49,43 +49,43 @@ export default function GolfWatchAppGaming({
- {playerInfoA.iconPath && ( + {playerInfoA.profile.iconPath && ( )}
Player 1
-
{playerInfoA.displayName}
+
{playerInfoA.profile.displayName}
-
{playerInfoA.score}
+
{playerInfoA.state.score}
{gameDisplayName}
{gameResult ? gameResult === "winA" - ? `勝者 ${playerInfoA.displayName}` + ? `勝者 ${playerInfoA.profile.displayName}` : gameResult === "winB" - ? `勝者 ${playerInfoB.displayName}` + ? `勝者 ${playerInfoB.profile.displayName}` : "引き分け" : leftTime}
-
{playerInfoB.score}
+
{playerInfoB.state.score}
Player 2
-
{playerInfoB.displayName}
+
{playerInfoB.profile.displayName}
- {playerInfoB.iconPath && ( + {playerInfoB.profile.iconPath && ( )} @@ -93,17 +93,17 @@ export default function GolfWatchAppGaming({
- +
- - + +
@@ -112,7 +112,7 @@ export default function GolfWatchAppGaming({ {problemDescription}
- +
); -- cgit v1.2.3-70-g09d2