From b923a9d6534820d33f42bc65c47ae22889bde922 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sat, 17 Aug 2024 21:10:03 +0900
Subject: feat(frontend): show player icon

---
 frontend/app/routes/dashboard.tsx | 11 +++++++++++
 1 file changed, 11 insertions(+)

(limited to 'frontend/app/routes/dashboard.tsx')

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 (
 		<div className="p-6 bg-gray-100 min-h-screen flex flex-col items-center">
+			{user.icon_path && (
+				<img
+					src={
+						process.env.NODE_ENV === "development"
+							? `http://localhost:8002/iosdc-japan/2024/code-battle${user.icon_path}`
+							: `/iosdc-japan/2024/code-battle${user.icon_path}`
+					}
+					alt={`${user.display_name} のアイコン`}
+					className="w-24 h-24 rounded-full mb-4"
+				/>
+			)}
 			<h1 className="text-2xl font-bold mb-4">
 				<span className="text-gray-800">{user.display_name}</span>
 				<span className="text-gray-500 ml-2">@{user.username}</span>
-- 
cgit v1.2.3-70-g09d2

