From 2cfd57fdc3990114d68023b3ff47bbbb57948f4e Mon Sep 17 00:00:00 2001 From: swcho Date: Tue, 22 Jul 2025 22:23:00 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=95=98=EC=88=98=EA=B4=80=EB=A1=9C=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=ED=8E=98=EC=9D=B4=EC=A7=80=20useEffect=20?= =?UTF-8?q?=EC=9D=98=EC=A1=B4=EC=84=B1=20=EB=B0=B0=EC=97=B4=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/components/popupComponent/MsSwagePpl.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/apps/sn/app/(map-layout)/map/components/popupComponent/MsSwagePpl.tsx b/apps/sn/app/(map-layout)/map/components/popupComponent/MsSwagePpl.tsx index eeaf78e94..9c80bbdc5 100644 --- a/apps/sn/app/(map-layout)/map/components/popupComponent/MsSwagePpl.tsx +++ b/apps/sn/app/(map-layout)/map/components/popupComponent/MsSwagePpl.tsx @@ -50,10 +50,6 @@ const MsSwagePpl = ({ featureData, onSaveClick }: { featureData: any, onSaveClic // 마운트 및 업데이트 시 API 호출 useEffect(() => { - // featureData가 변경될 때 관련 데이터 초기화 - setRepairData([]); - setCleaningData([]); - setInspectionData([]); if (featureData) { setFormData(featureData); } @@ -112,7 +108,7 @@ const MsSwagePpl = ({ featureData, onSaveClick }: { featureData: any, onSaveClic console.log('repairArr', repairArr); }; fetchAll(); - }, [featureData]); + }, []); // 폼 데이터가 변경될 때 호출될 핸들러 const handleFormDataChange = (newFormData: any) => {