From d03937cc92e48c5b10b4aec9aeac078ae2de8695 Mon Sep 17 00:00:00 2001 From: ysCha Date: Fri, 8 Aug 2025 14:51:07 +0900 Subject: [PATCH] =?UTF-8?q?[1237]=20=EB=AA=A8=EB=93=88=EC=84=A4=EC=A0=95,?= =?UTF-8?q?=20=EA=B3=B5=EB=B2=95=EC=84=A4=EC=A0=95=EC=8B=9C=EC=97=90=20?= =?UTF-8?q?=EB=AF=B8=EB=A6=AC=20=EA=B7=9C=EC=A0=95=EC=9D=98=20=EB=82=B4?= =?UTF-8?q?=EC=9A=A9=EC=9D=B4=20=EC=9E=85=EB=A0=A5=EB=90=98=EC=96=B4?= =?UTF-8?q?=EC=9E=88=EB=8A=94=EA=B2=83=EA=B3=BC=20=EA=B0=99=EC=9D=80=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20-=20=EC=84=A0=ED=83=9D=ED=95=98=EC=84=B8?= =?UTF-8?q?=EC=9A=94=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/floor-plan/modal/basic/step/Orientation.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/floor-plan/modal/basic/step/Orientation.jsx b/src/components/floor-plan/modal/basic/step/Orientation.jsx index d815bd2c..0b603aed 100644 --- a/src/components/floor-plan/modal/basic/step/Orientation.jsx +++ b/src/components/floor-plan/modal/basic/step/Orientation.jsx @@ -262,6 +262,12 @@ export const Orientation = forwardRef((props, ref) => { setRoofsStore(newRoofs) } + useEffect(() => { + // 컴포넌트가 마운트될 때 selectedModules가 없으면 handleChangeModule 호출 + if (moduleList.length > 0 && (!selectedModules || !selectedModules.itemId)) { + handleChangeModule(moduleList[0]); + } + }, [moduleList]); // 빈 의존성 배열로 마운트 시 한 번만 실행 return ( <>