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 ( <>