From e31c22dda15a665ffefc13b14a8b377062ef0351 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 21 Mar 2025 10:16:42 +0900 Subject: feat(frontend): make main players optional --- frontend/app/components/GolfWatchApp.tsx | 8 ++++---- .../GolfWatchApps/GolfWatchAppGaming1v1.tsx | 22 ++++++++++++---------- .../GolfWatchApps/GolfWatchAppWaiting1v1.tsx | 16 ++++++++++++---- 3 files changed, 28 insertions(+), 18 deletions(-) diff --git a/frontend/app/components/GolfWatchApp.tsx b/frontend/app/components/GolfWatchApp.tsx index 492d555..a8b4630 100644 --- a/frontend/app/components/GolfWatchApp.tsx +++ b/frontend/app/components/GolfWatchApp.tsx @@ -121,8 +121,8 @@ export default function GolfWatchApp({ return game.game_type === "1v1" ? ( ) : ( @@ -133,8 +133,8 @@ export default function GolfWatchApp({ return game.game_type === "1v1" ? (
- {playerProfileA.iconPath && ( + {playerProfileA?.iconPath && ( )} -
{playerProfileA.displayName}
+
{playerProfileA?.displayName}
{scoreA}
@@ -82,9 +84,9 @@ export default function GolfWatchAppGaming1v1({ {gameResultKind ? (
{gameResultKind === "winA" - ? `勝者 ${playerProfileA.displayName}` + ? `勝者 ${playerProfileA!.displayName}` : gameResultKind === "winB" - ? `勝者 ${playerProfileB.displayName}` + ? `勝者 ${playerProfileB!.displayName}` : "引き分け"}
) : ( @@ -94,8 +96,8 @@ export default function GolfWatchAppGaming1v1({
{scoreB}
-
{playerProfileB.displayName}
- {playerProfileB.iconPath && ( +
{playerProfileB?.displayName}
+ {playerProfileB?.iconPath && ( {gameDisplayName}
- + {playerProfileA ? ( + + ) : ( +
+ )}
vs.
- + {playerProfileB ? ( + + ) : ( +
+ )}
); -- cgit v1.2.3-70-g09d2