diff --git a/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx b/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx index 88188887..dde3e468 100644 --- a/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx +++ b/src/components/floor-plan/modal/roofAllocation/ContextRoofAllocationSetting.jsx @@ -31,6 +31,7 @@ export default function ContextRoofAllocationSetting(props) { handleSaveContext, currentRoofList, handleChangeInput, + handleChangePitch, } = useRoofAllocationSetting(id) const { findCommonCode } = useCommonCode() @@ -123,7 +124,7 @@ export default function ContextRoofAllocationSetting(props) { type="text" className="input-origin block" onChange={(e) => { - handleChangeInput(e, currentAngleType === 'slope' ? 'pitch' : 'angle', index) + handleChangePitch(e, index) }} defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle} /> diff --git a/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx b/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx index 1d58a93d..7a2519b0 100644 --- a/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx +++ b/src/components/floor-plan/modal/roofAllocation/RoofAllocationSetting.jsx @@ -33,6 +33,7 @@ export default function RoofAllocationSetting(props) { handleChangeLayout, currentRoofList, handleChangeInput, + handleChangePitch, } = useRoofAllocationSetting(id) const pitchText = useRecoilValue(pitchTextSelector) const { findCommonCode } = useCommonCode() @@ -125,7 +126,7 @@ export default function RoofAllocationSetting(props) { type="text" className="input-origin block" onChange={(e) => { - handleChangeInput(e, currentAngleType === 'slope' ? 'pitch' : 'angle', index) + handleChangePitch(e, index) }} defaultValue={currentAngleType === 'slope' ? roof.pitch : roof.angle} /> diff --git a/src/hooks/roofcover/useRoofAllocationSetting.js b/src/hooks/roofcover/useRoofAllocationSetting.js index 6471f644..550ce5f5 100644 --- a/src/hooks/roofcover/useRoofAllocationSetting.js +++ b/src/hooks/roofcover/useRoofAllocationSetting.js @@ -341,7 +341,6 @@ export function useRoofAllocationSetting(id) { const newRoofList = currentRoofList.map((roof, idx) => { return { ...roof, index: idx, ...basicInfo } }) - console.log('basicInfo', newRoofList) setBasicSetting((prev) => { return {