From 7fe9e048bfdeb85d90b8810d438249b547efa4bd Mon Sep 17 00:00:00 2001 From: htlee Date: Thu, 26 Mar 2026 10:46:05 +0900 Subject: [PATCH] =?UTF-8?q?refactor(debug):=20DebugTools=20=ED=97=88?= =?UTF-8?q?=EB=B8=8C=20=ED=8C=A8=ED=84=B4=20=E2=80=94=20=EB=8B=A8=EC=9D=BC?= =?UTF-8?q?=20lazy=20import=EB=A1=9C=20=ED=86=B5=ED=95=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - debug/index.tsx: 모든 디버그 도구 조합 export - KoreaMap: lazy import 1줄 + JSX 1줄만 유지 - 디버그 도구 추가/제거 시 debug/index.tsx만 수정 --- frontend/src/components/korea/KoreaMap.tsx | 10 ++++---- frontend/src/components/korea/debug/index.tsx | 24 +++++++++++++++++++ 2 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 frontend/src/components/korea/debug/index.tsx diff --git a/frontend/src/components/korea/KoreaMap.tsx b/frontend/src/components/korea/KoreaMap.tsx index 1df454a..9e2c0d3 100644 --- a/frontend/src/components/korea/KoreaMap.tsx +++ b/frontend/src/components/korea/KoreaMap.tsx @@ -201,10 +201,10 @@ const FILTER_I18N_KEY: Record = { cnFishing: 'filters.cnFishingMonitor', }; -// [DEBUG] 좌표 디버그 — DEV에서만 동적 로드, 프로덕션 번들에서 완전 제거 +// [DEBUG] 개발용 도구 — DEV에서만 동적 로드, 프로덕션 번들에서 완전 제거 import { lazy, Suspense } from 'react'; -const DevCoordDebug = import.meta.env.DEV - ? lazy(() => import('./debug/DevCoordDebug')) +const DebugTools = import.meta.env.DEV + ? lazy(() => import('./debug')) : null; export function KoreaMap({ ships, allShips, aircraft, satellites, layers, osintFeed, currentTime, koreaFilters, transshipSuspects, cableWatchSuspects, dokdoWatchSuspects, dokdoAlerts, vesselAnalysis, groupPolygons, hiddenShipCategories, hiddenNationalities, externalFlyTo, onExternalFlyToDone, opsRoute }: Props) { @@ -615,8 +615,8 @@ export function KoreaMap({ ships, allShips, aircraft, satellites, layers, osintF > - {/* [DEBUG] Ctrl+Click 좌표 표시 — 프로덕션 번들에서 완전 제거 */} - {DevCoordDebug && } + {/* [DEBUG] 개발용 도구 — 프로덕션 번들에서 완전 제거 */} + {DebugTools && } ; +} + +export default function DebugTools({ mapRef }: Props) { + return ( + <> + + {/* 디버그 도구 추가 시 여기에 한 줄 추가 */} + {/* */} + {/* */} + + ); +}