diff --git a/apps/sn/app/map/components/common/index.ts b/apps/sn/app/map/components/common/index.ts index 240085459..c3e1a4a37 100644 --- a/apps/sn/app/map/components/common/index.ts +++ b/apps/sn/app/map/components/common/index.ts @@ -5,7 +5,7 @@ import Ssc from "../popupComponent/Ssc"; import StormWaterPump from "../popupComponent/stormWaterPump"; import SwtrmtFclt from "../popupComponent/SwtrmtFclt"; -type LayerComponentProps = { featureData: any }; +type LayerComponentProps = { featureData: any; chkMainSsc?: boolean }; type LayerContentMap = { [key: string]: { component?: React.FC; @@ -21,7 +21,7 @@ const layerContentMap: LayerContentMap = { }, "하수처리구역": { }, "우수토실":{component: Ssc,}, - "중점우수토실":{component: Ssc, props: { chkMainSsc: true } }, // 중점우수토실 여부 설정 + "중점우수토실":{component: Ssc, }, // 중점우수토실 여부 설정 "하수관로":{component: MsSwagePpl,}, "하수맨홀":{component: smh,}, "빗물펌프":{component:StormWaterPump}, @@ -35,7 +35,7 @@ export const getLayerContentComponent = (layerNm: string): React.FC null; } - return component.component, component.props; + return component.component }; // 사용자 입력 필드 (보수 및 갱신, 청소 및 준설, 점검 및 진단) export const handleInputChange = (section: string, diff --git a/apps/sn/app/map/featureClickEventPopup.tsx b/apps/sn/app/map/featureClickEventPopup.tsx index 8c83aba4b..2f70adbc3 100644 --- a/apps/sn/app/map/featureClickEventPopup.tsx +++ b/apps/sn/app/map/featureClickEventPopup.tsx @@ -21,6 +21,7 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, const [fetchData, setfetchData] = useState(); // api 호출여부 const contentRef = useRef(null); const [isModalOpen, setIsModalOpen] = useState(false); // 모달 열기 상태 + const [chkMainSsc, setChkMainSsc] = useState(false); // 중점우수토실 여부 // 피쳐데이터의 현재 레이어 이름 가져오는 함수 const getSelectedLayers = () => { let result = null; @@ -62,6 +63,7 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, break; case '중점우수토실': setButtonChk(false) + setChkMainSsc(true) break; case '우수토실': setButtonChk(true) @@ -155,7 +157,7 @@ const FeatureClickEventPopup = ({ onClose, featureData }: { onClose: () => void, : null}
정보를 저장하시겠습니까?
- {ContentComponent && } + {ContentComponent && } )