diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-17 21:10:03 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-17 21:10:18 +0900 |
| commit | b923a9d6534820d33f42bc65c47ae22889bde922 (patch) | |
| tree | eea4f5ac0f025c7bdbff71d2ee83b4dce99355ef /frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx | |
| parent | 95dd5f0c346d10c9a9497daf88cd199ce71c8122 (diff) | |
| download | phperkaigi-2025-albatross-b923a9d6534820d33f42bc65c47ae22889bde922.tar.gz phperkaigi-2025-albatross-b923a9d6534820d33f42bc65c47ae22889bde922.tar.zst phperkaigi-2025-albatross-b923a9d6534820d33f42bc65c47ae22889bde922.zip | |
feat(frontend): show player icon
Diffstat (limited to 'frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx')
| -rw-r--r-- | frontend/app/components/GolfPlayApps/GolfPlayAppGaming.tsx | 26 |
1 files changed, 20 insertions, 6 deletions
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({ <div className="text-gray-100">{gameDisplayName}</div> <div className="text-2xl">{leftTime}</div> </div> - <div className="font-bold text-end"> - <Link to={"/dashboard"} className="text-gray-100"> - {playerInfo.displayName} - </Link> - <div className="text-2xl">{playerInfo.score}</div> - </div> + <Link to={"/dashboard"}> + <div className="flex gap-4 my-auto font-bold"> + <div className="text-6xl">{playerInfo.score}</div> + <div className="text-end"> + <div className="text-gray-100">Player 1</div> + <div className="text-2xl">{playerInfo.displayName}</div> + </div> + {playerInfo.iconPath && ( + <img + src={ + process.env.NODE_ENV === "development" + ? `http://localhost:8002/iosdc-japan/2024/code-battle${playerInfo.iconPath}` + : `/iosdc-japan/2024/code-battle${playerInfo.iconPath}` + } + alt={`${playerInfo.displayName} のアイコン`} + className="w-12 h-12 rounded-full my-auto border-4 border-white" + /> + )} + </div> + </Link> </div> <div className="grow grid grid-cols-3 divide-x divide-gray-300"> <div className="p-4"> |
