diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-08-19 04:40:08 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-08-19 04:40:08 +0900 |
| commit | 6031c81f5394acf315b277302a7fd18ea288b506 (patch) | |
| tree | 30377a3435445f48ce5de342d240990994cf2e71 /frontend/app/components/UserIcon.tsx | |
| parent | f662c0832f1f7f45a4e1a926f3ec5a1d21e80fa7 (diff) | |
| download | phperkaigi-2025-albatross-6031c81f5394acf315b277302a7fd18ea288b506.tar.gz phperkaigi-2025-albatross-6031c81f5394acf315b277302a7fd18ea288b506.tar.zst phperkaigi-2025-albatross-6031c81f5394acf315b277302a7fd18ea288b506.zip | |
refactor(frontend): extract UserIcon component
Diffstat (limited to 'frontend/app/components/UserIcon.tsx')
| -rw-r--r-- | frontend/app/components/UserIcon.tsx | 19 |
1 files changed, 19 insertions, 0 deletions
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}`} + /> + ); +} |
