From b923a9d6534820d33f42bc65c47ae22889bde922 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 17 Aug 2024 21:10:03 +0900 Subject: feat(frontend): show player icon --- .../components/GolfPlayApps/GolfPlayAppGaming.tsx | 26 +++++++++++---- .../GolfWatchApps/GolfWatchAppGaming.tsx | 38 ++++++++++++++++++---- frontend/app/routes/dashboard.tsx | 11 +++++++ 3 files changed, 63 insertions(+), 12 deletions(-) (limited to 'frontend') diff --git a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx index 4730583..a6c4550 100644 --- a/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx +++ b/frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx @@ -55,12 +55,26 @@ export default function GolfPlayAppGaming({
{gameDisplayName}
{leftTime}
-
- - {playerInfo.displayName} - -
{playerInfo.score}
-
+ +
+
{playerInfo.score}
+
+
Player 1
+
{playerInfo.displayName}
+
+ {playerInfo.iconPath && ( + {`${playerInfo.displayName} + )} +
+
diff --git a/frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx b/frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx index c4c3a53..63c232b 100644 --- a/frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx +++ b/frontend/app/components/GolfWatchApps/GolfWatchAppGaming.tsx @@ -47,9 +47,22 @@ export default function GolfWatchAppGaming({
-
-
Player 1
-
{playerInfoA.displayName}
+
+ {playerInfoA.iconPath && ( + {`${playerInfoA.displayName} + )} +
+
Player 1
+
{playerInfoA.displayName}
+
{playerInfoA.score}
@@ -59,9 +72,22 @@ export default function GolfWatchAppGaming({
{playerInfoB.score}
-
-
Player 2
-
{playerInfoB.displayName}
+
+
+
Player 2
+
{playerInfoB.displayName}
+
+ {playerInfoB.iconPath && ( + {`${playerInfoB.displayName} + )}
diff --git a/frontend/app/routes/dashboard.tsx b/frontend/app/routes/dashboard.tsx index 99c64f2..614b3ae 100644 --- a/frontend/app/routes/dashboard.tsx +++ b/frontend/app/routes/dashboard.tsx @@ -31,6 +31,17 @@ export default function Dashboard() { return (
+ {user.icon_path && ( + {`${user.display_name} + )}

{user.display_name} @{user.username} -- cgit v1.2.3-70-g09d2