From bfc7b3fe328162e3e4ae7c50c66efcd48800ff3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=8B=9D?= <43837214+Minsiki@users.noreply.github.com> Date: Wed, 2 Apr 2025 16:54:21 +0900 Subject: [PATCH] =?UTF-8?q?Revert=20"Trestle=20=EB=8D=B0=EC=9D=B4=ED=84=B0?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80=20=EC=88=98=EC=A0=95"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 648c2e208a89c0080e49d9c570ac2b3700374b2a. --- .../floor-plan/modal/basic/step/Trestle.jsx | 11 +---------- src/hooks/module/useModuleTrestle.js | 7 ------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/components/floor-plan/modal/basic/step/Trestle.jsx b/src/components/floor-plan/modal/basic/step/Trestle.jsx index e3d093a7..dd5a7529 100644 --- a/src/components/floor-plan/modal/basic/step/Trestle.jsx +++ b/src/components/floor-plan/modal/basic/step/Trestle.jsx @@ -18,7 +18,6 @@ const Trestle = forwardRef((props, ref) => { const [selectedRoof, setSelectedRoof] = useState() const { trestleState, - trestleDetail, dispatch, raftBaseList, trestleList, @@ -172,7 +171,6 @@ const Trestle = forwardRef((props, ref) => { snowGdPossYn, cvrChecked, snowGdChecked, - trestleDetail, } } return { ...roof } @@ -226,7 +224,6 @@ const Trestle = forwardRef((props, ref) => { snowGdPossYn, cvrChecked, snowGdChecked, - trestleDetail, } } return { ...roof } @@ -261,22 +258,16 @@ const Trestle = forwardRef((props, ref) => { setRoofs(newAddedRoofs) setModuleSelectionData({ ...moduleSelectionData, - roofConstructions: newAddedRoofs.map((roof, index) => { + roofConstructions: newAddedRoofs.map((roof) => { return { addRoof: { ...roof.addRoof, - ...moduleSelectionData.roofConstructions[index].addRoof, }, trestle: { ...roof.trestle, - ...moduleSelectionData.roofConstructions[index].trestle, }, construction: { ...roof.construction, - ...moduleSelectionData.roofConstructions[index].construction, - }, - trestleDetail: { - ...roof.trestleDetail, }, } }), diff --git a/src/hooks/module/useModuleTrestle.js b/src/hooks/module/useModuleTrestle.js index 178054ef..d0838b34 100644 --- a/src/hooks/module/useModuleTrestle.js +++ b/src/hooks/module/useModuleTrestle.js @@ -64,7 +64,6 @@ export function useModuleTrestle(props) { const [ridgeMargin, setRidgeMargin] = useState(0) const [kerabaMargin, setKerabaMargin] = useState(0) const [trestleState, dispatch] = useReducer(trestleReducer, null) - const [trestleDetail, setTrestleDetail] = useState(null) useEffect(() => { const raftCodeList = findCommonCode(RAFT_BASE_CODE) @@ -91,7 +90,6 @@ export function useModuleTrestle(props) { setConstMthdList([]) setRoofBaseList([]) setConstructionList([]) - setTrestleDetail(null) return } @@ -99,20 +97,17 @@ export function useModuleTrestle(props) { if (!trestleState.constMthdCd) { setRoofBaseList([]) setConstructionList([]) - setTrestleDetail(null) return } handleSetRoofBaseList() if (!trestleState.roofBaseCd) { setConstructionList([]) - setTrestleDetail(null) return } handleSetConstructionList() if (!trestleState.constTp) { - setTrestleDetail(null) return } @@ -198,7 +193,6 @@ export function useModuleTrestle(props) { setEavesMargin(res[0].data.eaveIntvl) setRidgeMargin(res[0].data.ridgeIntvl) setKerabaMargin(res[0].data.kerabaIntvl) - setTrestleDetail(res[0].data) // dispatch({ // type: 'SET_TRESTLE_DETAIL', // roof: { @@ -214,7 +208,6 @@ export function useModuleTrestle(props) { return { trestleState, - trestleDetail, dispatch, raftBaseList, trestleList,