From 6031c81f5394acf315b277302a7fd18ea288b506 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Mon, 19 Aug 2024 04:40:08 +0900
Subject: refactor(frontend): extract UserIcon component

---
 frontend/app/components/UserIcon.tsx | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 frontend/app/components/UserIcon.tsx

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

diff --git a/frontend/app/components/UserIcon.tsx b/frontend/app/components/UserIcon.tsx
new file mode 100644
index 0000000..656c170
--- /dev/null
+++ b/frontend/app/components/UserIcon.tsx
@@ -0,0 +1,19 @@
+type Props = {
+	iconPath: string;
+	displayName: string;
+	className: string;
+};
+
+export default function UserIcon({ iconPath, displayName, className }: Props) {
+	return (
+		<img
+			src={
+				process.env.NODE_ENV === "development"
+					? `http://localhost:8002/iosdc-japan/2024/code-battle${iconPath}`
+					: `/iosdc-japan/2024/code-battle${iconPath}`
+			}
+			alt={`${displayName} のアイコン`}
+			className={`rounded-full border-4 border-white ${className}`}
+		/>
+	);
+}
-- 
cgit v1.2.3-70-g09d2

