From be67395f1354ef7ceaf197174821ae14628555be Mon Sep 17 00:00:00 2001 From: kiminchan Date: Thu, 25 Jun 2026 10:22:40 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=95=EB=B3=B4=EA=B2=80=EC=83=89=20?= =?UTF-8?q?=ED=8C=9D=EC=97=85=20=EC=A1=B0=ED=9A=8C=EC=A1=B0=EA=B1=B4=20?= =?UTF-8?q?=EA=B3=B5=ED=86=B5=EC=BD=94=EB=93=9C=20=EC=B4=88=EA=B8=B0?= =?UTF-8?q?=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/SearchModalPopupContent.tsx | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/apps/sn/src/features/windowPopup/ui/SearchModalPopupContent.tsx b/apps/sn/src/features/windowPopup/ui/SearchModalPopupContent.tsx index 0bbb50bbe..ed32a55a8 100644 --- a/apps/sn/src/features/windowPopup/ui/SearchModalPopupContent.tsx +++ b/apps/sn/src/features/windowPopup/ui/SearchModalPopupContent.tsx @@ -1,5 +1,48 @@ +"use client"; + import SearchModal from "@/app/(map-layout)/map/searchModal/searchModal"; +import useStore from "@/store/useStore"; +import { useEffect } from "react"; export default function SearchModalPopupContent() { + const { + ctpv, + sgg, + BIZ_SE_CD, + BIZ_TY_CD, + fetchCtpv, + fetchSgg, + fetchBIZ_SE_CD, + fetchBIZ_TY_CD, + } = useStore(); + + useEffect(() => { + // Popup windows do not run map-layout initialization, so load search codes here. + if (ctpv.length === 0) { + void fetchCtpv(); + } + + if (sgg.length === 0) { + void fetchSgg(); + } + + if (BIZ_SE_CD.length === 0) { + void fetchBIZ_SE_CD(); + } + + if (BIZ_TY_CD.length === 0) { + void fetchBIZ_TY_CD(); + } + }, [ + BIZ_SE_CD.length, + BIZ_TY_CD.length, + ctpv.length, + fetchBIZ_SE_CD, + fetchBIZ_TY_CD, + fetchCtpv, + fetchSgg, + sgg.length, + ]); + return ; }