From 5fa377115dfe13ead5c22a47aee4924cf7b19074 Mon Sep 17 00:00:00 2001 From: NISHIZAWA Shuntaro Date: Tue, 5 Nov 2024 04:00:11 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=AB=AA=E8=89=B2=E3=81=AE=E5=A4=89?= =?UTF-8?q?=E6=9B=B4=E3=82=82DB=E3=81=AB=E4=BF=9D=E5=AD=98=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/ModelConfig.tsx | 76 ++++++++++++++++++++++------------ app/routes/_auth.edit.tsx | 8 ++++ 2 files changed, 57 insertions(+), 27 deletions(-) diff --git a/app/components/ModelConfig.tsx b/app/components/ModelConfig.tsx index 9674589..0c3b2e8 100644 --- a/app/components/ModelConfig.tsx +++ b/app/components/ModelConfig.tsx @@ -9,43 +9,65 @@ interface ModelConfigProps { characterSetting: CharacterSetting; onModelSelect?: (model: Model) => void; onAccessorySelect?: (accessory: Accessory) => void; + onHairColorChange?: (color: string) => void; } export function ModelConfig({ characterSetting, onModelSelect, onAccessorySelect, + onHairColorChange, }: ModelConfigProps) { return ( -
-
- {MODEL_LIST.map((model) => ( - - ))} +
+
+ モデル: +
+ {MODEL_LIST.map((model) => ( + + ))} +
-
- {ACCESSORY_LIST.map((accessory) => ( - - ))} +
+ アクセサリー: +
+ {ACCESSORY_LIST.map((accessory) => ( + + ))} +
+
+ +
+
{/* モデル選択ボタン */} diff --git a/app/routes/_auth.edit.tsx b/app/routes/_auth.edit.tsx index 293b2af..8475d5d 100644 --- a/app/routes/_auth.edit.tsx +++ b/app/routes/_auth.edit.tsx @@ -25,6 +25,13 @@ export default function Page(): ReactNode { }); }; + const handleHairColorChange = (color: string) => { + updateCharacterSetting({ + ...myProfile.characterSetting, + hair: color, + }); + }; + return (
@@ -33,6 +40,7 @@ export default function Page(): ReactNode { characterSetting={myProfile.characterSetting} onModelSelect={handleModelSelect} onAccessorySelect={handleAccessorySelect} + onHairColorChange={handleHairColorChange} />