From 02f9bd2255554e2de28547a980b2810e34b072de Mon Sep 17 00:00:00 2001 From: seorinn Date: Wed, 13 May 2026 15:56:33 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20[TA-240]=20MoreInfo=20onNext?= =?UTF-8?q?=EC=97=90=20=EA=B0=92=20=EC=A7=81=EC=A0=91=20=EC=A0=84=EB=8B=AC?= =?UTF-8?q?=EB=A1=9C=20stale=20userInfo=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/SignUp/MoreInfo/index.tsx | 9 ++------- src/pages/SignUp/index.tsx | 7 +++++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/pages/SignUp/MoreInfo/index.tsx b/src/pages/SignUp/MoreInfo/index.tsx index a01e597..e9bd303 100644 --- a/src/pages/SignUp/MoreInfo/index.tsx +++ b/src/pages/SignUp/MoreInfo/index.tsx @@ -8,7 +8,7 @@ import ButtonActive from "../../../components/ButtonActive"; interface Props { userInfo: any; setUserInfo: React.Dispatch>; - onNext: () => void; + onNext: (updates: { mainPhotographyTypes: string[]; activeRegions: string[] }) => void; } export default function MoreInfo({ @@ -33,12 +33,7 @@ export default function MoreInfo({ }, [userInfo, mainPhotographyTypes, locs]); const handleNext = () => { - setUserInfo({ - ...userInfo, - mainPhotographyTypes, - activeRegions: locs, - }); - onNext(); + onNext({ mainPhotographyTypes, activeRegions: locs }); }; return ( diff --git a/src/pages/SignUp/index.tsx b/src/pages/SignUp/index.tsx index 771235d..11e1958 100644 --- a/src/pages/SignUp/index.tsx +++ b/src/pages/SignUp/index.tsx @@ -30,8 +30,11 @@ export default function SignUp() { setStep(step + 1); }; - const goToNextStep = () => { - setStep(step + 1); + const goToNextStep = (updates?: { mainPhotographyTypes?: string[]; activeRegions?: string[] }) => { + if (updates) { + setUserInfo((prev) => ({ ...prev, ...updates })); + } + setStep((prev) => prev + 1); }; const handleSignUp = () => { From 649ac76eba978b9e3c8ccba685256f896b418d7f Mon Sep 17 00:00:00 2001 From: seorinn Date: Wed, 13 May 2026 15:58:51 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20[TA-240]=20activeRegions=20=EC=B4=88?= =?UTF-8?q?=EA=B8=B0=EA=B0=92=20=ED=83=80=EC=9E=85=20=EB=8B=A8=EC=96=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/SignUp/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/SignUp/index.tsx b/src/pages/SignUp/index.tsx index 11e1958..dbb3d7a 100644 --- a/src/pages/SignUp/index.tsx +++ b/src/pages/SignUp/index.tsx @@ -22,7 +22,7 @@ export default function SignUp() { instagramId: null, profileImage: { name: "", url: "" }, mainPhotographyTypes: [""], - activeRegions: [], + activeRegions: [] as string[], }); const handleRoleSelect = (selectedRole: string) => {