From bf3b2b2f5fdfe4d54226b59ce82378e4a77dc700 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Thu, 14 Aug 2025 22:31:32 +0900
Subject: feat(backend,frontend): Replace hard-coded base path with environment
 variable

---
 frontend/app/components/UserIcon.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'frontend/app/components/UserIcon.tsx')

diff --git a/frontend/app/components/UserIcon.tsx b/frontend/app/components/UserIcon.tsx
index e14a571..8002c6f 100644
--- a/frontend/app/components/UserIcon.tsx
+++ b/frontend/app/components/UserIcon.tsx
@@ -1,3 +1,5 @@
+import { BASE_PATH } from "../config";
+
 type Props = {
 	iconPath: string;
 	displayName: string;
@@ -9,8 +11,8 @@ export default function UserIcon({ iconPath, displayName, className }: Props) {
 		<img
 			src={
 				process.env.NODE_ENV === "development"
-					? `http://localhost:8003/phperkaigi/2025/code-battle${iconPath}`
-					: `/phperkaigi/2025/code-battle${iconPath}`
+					? `http://localhost:8003${BASE_PATH}${iconPath}`
+					: `${BASE_PATH}${iconPath}`
 			}
 			alt={`${displayName} のアイコン`}
 			className={`rounded-full border-4 border-white ${className}`}
-- 
cgit v1.3.1

