From 8062fe5a52d798574c23bf27b629d1e7ca407dc3 Mon Sep 17 00:00:00 2001 From: htlee Date: Wed, 18 Mar 2026 08:21:08 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=EC=BB=B4=ED=8F=AC=EB=84=8C?= =?UTF-8?q?=ED=8A=B8=20=EC=84=9C=EB=B8=8C=EB=94=94=EB=A0=89=ED=86=A0?= =?UTF-8?q?=EB=A6=AC=20import=20=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 리팩토링 시 components/ → common/layers/iran/korea/ 이동 후 ../data/ ../services/ 상대 경로가 ../../ 로 변경 필요했으나 누락. vite build 실패 해결 (24개 파일 수정). Co-Authored-By: Claude Opus 4.6 (1M context) --- frontend/src/components/common/CollectorMonitor.tsx | 4 ++-- frontend/src/components/common/EventLog.tsx | 4 ++-- frontend/src/components/common/EventStrip.tsx | 2 +- frontend/src/components/common/SensorChart.tsx | 2 +- frontend/src/components/common/TimelineSlider.tsx | 2 +- frontend/src/components/iran/AirportLayer.tsx | 2 +- frontend/src/components/iran/GlobeMap.tsx | 4 ++-- frontend/src/components/iran/OilFacilityLayer.tsx | 2 +- frontend/src/components/iran/ReplayMap.tsx | 8 ++++---- frontend/src/components/iran/SatelliteMap.tsx | 8 ++++---- frontend/src/components/korea/CctvLayer.tsx | 4 ++-- frontend/src/components/korea/CoastGuardLayer.tsx | 4 ++-- frontend/src/components/korea/EezLayer.tsx | 2 +- frontend/src/components/korea/InfraLayer.tsx | 2 +- frontend/src/components/korea/KoreaAirportLayer.tsx | 4 ++-- frontend/src/components/korea/KoreaMap.tsx | 10 +++++----- frontend/src/components/korea/NavWarningLayer.tsx | 4 ++-- frontend/src/components/korea/OsintMapLayer.tsx | 2 +- frontend/src/components/korea/PiracyLayer.tsx | 4 ++-- frontend/src/components/korea/SubmarineCableLayer.tsx | 4 ++-- frontend/src/components/layers/AircraftLayer.tsx | 2 +- frontend/src/components/layers/DamagedShipLayer.tsx | 4 ++-- frontend/src/components/layers/SatelliteLayer.tsx | 2 +- frontend/src/components/layers/ShipLayer.tsx | 2 +- 24 files changed, 44 insertions(+), 44 deletions(-) diff --git a/frontend/src/components/common/CollectorMonitor.tsx b/frontend/src/components/common/CollectorMonitor.tsx index 5b86731..e1d8ee7 100644 --- a/frontend/src/components/common/CollectorMonitor.tsx +++ b/frontend/src/components/common/CollectorMonitor.tsx @@ -1,6 +1,6 @@ import { useState, useEffect, useCallback } from 'react'; -import { fetchCollectorStatus } from '../services/collectorStatus'; -import type { CollectorInfo } from '../services/collectorStatus'; +import { fetchCollectorStatus } from '../../services/collectorStatus'; +import type { CollectorInfo } from '../../services/collectorStatus'; interface CollectorMonitorProps { onClose: () => void; diff --git a/frontend/src/components/common/EventLog.tsx b/frontend/src/components/common/EventLog.tsx index 01e6b70..e098280 100644 --- a/frontend/src/components/common/EventLog.tsx +++ b/frontend/src/components/common/EventLog.tsx @@ -1,7 +1,7 @@ import { useMemo } from 'react'; import { useTranslation } from 'react-i18next'; -import type { GeoEvent, Ship } from '../types'; -import type { OsintItem } from '../services/osint'; +import type { GeoEvent, Ship } from '../../types'; +import type { OsintItem } from '../../services/osint'; type DashboardTab = 'iran' | 'korea'; diff --git a/frontend/src/components/common/EventStrip.tsx b/frontend/src/components/common/EventStrip.tsx index 8a72c87..922a14a 100644 --- a/frontend/src/components/common/EventStrip.tsx +++ b/frontend/src/components/common/EventStrip.tsx @@ -1,6 +1,6 @@ import { useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; -import type { GeoEvent } from '../types'; +import type { GeoEvent } from '../../types'; interface Props { events: GeoEvent[]; diff --git a/frontend/src/components/common/SensorChart.tsx b/frontend/src/components/common/SensorChart.tsx index 288a22d..9aa24d1 100644 --- a/frontend/src/components/common/SensorChart.tsx +++ b/frontend/src/components/common/SensorChart.tsx @@ -10,7 +10,7 @@ import { ResponsiveContainer, ReferenceLine, } from 'recharts'; -import type { SensorLog } from '../types'; +import type { SensorLog } from '../../types'; interface Props { data: SensorLog[]; diff --git a/frontend/src/components/common/TimelineSlider.tsx b/frontend/src/components/common/TimelineSlider.tsx index 23e4e23..27cc837 100644 --- a/frontend/src/components/common/TimelineSlider.tsx +++ b/frontend/src/components/common/TimelineSlider.tsx @@ -1,6 +1,6 @@ import { useMemo, useState, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; -import type { GeoEvent } from '../types'; +import type { GeoEvent } from '../../types'; interface Props { currentTime: number; diff --git a/frontend/src/components/iran/AirportLayer.tsx b/frontend/src/components/iran/AirportLayer.tsx index 1b3b1ab..bc0cc96 100644 --- a/frontend/src/components/iran/AirportLayer.tsx +++ b/frontend/src/components/iran/AirportLayer.tsx @@ -1,6 +1,6 @@ import { memo, useMemo, useState } from 'react'; import { Marker, Popup } from 'react-map-gl/maplibre'; -import type { Airport } from '../data/airports'; +import type { Airport } from '../../data/airports'; const US_BASE_ICAOS = new Set([ 'OMAD', 'OTBH', 'OKAJ', 'LTAG', 'OEPS', 'ORAA', 'ORBD', 'OBBS', 'OMTH', 'HDCL', diff --git a/frontend/src/components/iran/GlobeMap.tsx b/frontend/src/components/iran/GlobeMap.tsx index 109bdc5..682f9cd 100644 --- a/frontend/src/components/iran/GlobeMap.tsx +++ b/frontend/src/components/iran/GlobeMap.tsx @@ -1,8 +1,8 @@ import { useRef, useEffect } from 'react'; import maplibregl from 'maplibre-gl'; import 'maplibre-gl/dist/maplibre-gl.css'; -import { countryLabelsGeoJSON } from '../data/countryLabels'; -import type { GeoEvent, Aircraft, SatellitePosition, Ship, LayerVisibility } from '../types'; +import { countryLabelsGeoJSON } from '../../data/countryLabels'; +import type { GeoEvent, Aircraft, SatellitePosition, Ship, LayerVisibility } from '../../types'; interface Props { events: GeoEvent[]; diff --git a/frontend/src/components/iran/OilFacilityLayer.tsx b/frontend/src/components/iran/OilFacilityLayer.tsx index 8e95089..e1248ce 100644 --- a/frontend/src/components/iran/OilFacilityLayer.tsx +++ b/frontend/src/components/iran/OilFacilityLayer.tsx @@ -1,7 +1,7 @@ import { memo, useState } from 'react'; import { Marker, Popup } from 'react-map-gl/maplibre'; import { useTranslation } from 'react-i18next'; -import type { OilFacility, OilFacilityType } from '../types'; +import type { OilFacility, OilFacilityType } from '../../types'; interface Props { facilities: OilFacility[]; diff --git a/frontend/src/components/iran/ReplayMap.tsx b/frontend/src/components/iran/ReplayMap.tsx index 388b922..f6be33c 100644 --- a/frontend/src/components/iran/ReplayMap.tsx +++ b/frontend/src/components/iran/ReplayMap.tsx @@ -8,10 +8,10 @@ import { ShipLayer } from '../layers/ShipLayer'; import { DamagedShipLayer } from '../layers/DamagedShipLayer'; import { OilFacilityLayer } from './OilFacilityLayer'; import { AirportLayer } from './AirportLayer'; -import { iranOilFacilities } from '../data/oilFacilities'; -import { middleEastAirports } from '../data/airports'; -import type { GeoEvent, Aircraft, SatellitePosition, Ship, LayerVisibility } from '../types'; -import { countryLabelsGeoJSON } from '../data/countryLabels'; +import { iranOilFacilities } from '../../data/oilFacilities'; +import { middleEastAirports } from '../../data/airports'; +import type { GeoEvent, Aircraft, SatellitePosition, Ship, LayerVisibility } from '../../types'; +import { countryLabelsGeoJSON } from '../../data/countryLabels'; import 'maplibre-gl/dist/maplibre-gl.css'; export interface FlyToTarget { diff --git a/frontend/src/components/iran/SatelliteMap.tsx b/frontend/src/components/iran/SatelliteMap.tsx index 8ac21f6..9180ee8 100644 --- a/frontend/src/components/iran/SatelliteMap.tsx +++ b/frontend/src/components/iran/SatelliteMap.tsx @@ -8,10 +8,10 @@ import { ShipLayer } from '../layers/ShipLayer'; import { DamagedShipLayer } from '../layers/DamagedShipLayer'; import { OilFacilityLayer } from './OilFacilityLayer'; import { AirportLayer } from './AirportLayer'; -import { iranOilFacilities } from '../data/oilFacilities'; -import { middleEastAirports } from '../data/airports'; -import type { GeoEvent, Aircraft, SatellitePosition, Ship, LayerVisibility } from '../types'; -import { countryLabelsGeoJSON } from '../data/countryLabels'; +import { iranOilFacilities } from '../../data/oilFacilities'; +import { middleEastAirports } from '../../data/airports'; +import type { GeoEvent, Aircraft, SatellitePosition, Ship, LayerVisibility } from '../../types'; +import { countryLabelsGeoJSON } from '../../data/countryLabels'; import maplibregl from 'maplibre-gl'; import 'maplibre-gl/dist/maplibre-gl.css'; diff --git a/frontend/src/components/korea/CctvLayer.tsx b/frontend/src/components/korea/CctvLayer.tsx index 53c3a65..30604e1 100644 --- a/frontend/src/components/korea/CctvLayer.tsx +++ b/frontend/src/components/korea/CctvLayer.tsx @@ -2,8 +2,8 @@ import { useState, useRef, useEffect, useCallback } from 'react'; import { Marker, Popup } from 'react-map-gl/maplibre'; import { useTranslation } from 'react-i18next'; import Hls from 'hls.js'; -import { KOREA_CCTV_CAMERAS } from '../services/cctv'; -import type { CctvCamera } from '../services/cctv'; +import { KOREA_CCTV_CAMERAS } from '../../services/cctv'; +import type { CctvCamera } from '../../services/cctv'; const REGION_COLOR: Record = { '제주': '#ff6b6b', diff --git a/frontend/src/components/korea/CoastGuardLayer.tsx b/frontend/src/components/korea/CoastGuardLayer.tsx index 87a674f..df10aef 100644 --- a/frontend/src/components/korea/CoastGuardLayer.tsx +++ b/frontend/src/components/korea/CoastGuardLayer.tsx @@ -1,8 +1,8 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Marker, Popup } from 'react-map-gl/maplibre'; -import { COAST_GUARD_FACILITIES, CG_TYPE_LABEL } from '../services/coastGuard'; -import type { CoastGuardFacility, CoastGuardType } from '../services/coastGuard'; +import { COAST_GUARD_FACILITIES, CG_TYPE_LABEL } from '../../services/coastGuard'; +import type { CoastGuardFacility, CoastGuardType } from '../../services/coastGuard'; const TYPE_COLOR: Record = { hq: '#ff6b6b', diff --git a/frontend/src/components/korea/EezLayer.tsx b/frontend/src/components/korea/EezLayer.tsx index 00d2cb6..a97f2ee 100644 --- a/frontend/src/components/korea/EezLayer.tsx +++ b/frontend/src/components/korea/EezLayer.tsx @@ -1,5 +1,5 @@ import { Source, Layer } from 'react-map-gl/maplibre'; -import { KOREA_EEZ_BOUNDARY, KOREA_CHINA_PMZ, NLL_WEST_SEA, NLL_EAST_SEA } from '../services/koreaEez'; +import { KOREA_EEZ_BOUNDARY, KOREA_CHINA_PMZ, NLL_WEST_SEA, NLL_EAST_SEA } from '../../services/koreaEez'; import type { FillLayerSpecification, LineLayerSpecification } from 'maplibre-gl'; // Convert [lat, lng][] to GeoJSON [lng, lat][] ring diff --git a/frontend/src/components/korea/InfraLayer.tsx b/frontend/src/components/korea/InfraLayer.tsx index 5681159..f4795b9 100644 --- a/frontend/src/components/korea/InfraLayer.tsx +++ b/frontend/src/components/korea/InfraLayer.tsx @@ -1,6 +1,6 @@ import { useMemo, useState } from 'react'; import { Marker, Popup } from 'react-map-gl/maplibre'; -import type { PowerFacility } from '../services/infra'; +import type { PowerFacility } from '../../services/infra'; // SVG Wind Turbine Icon function WindTurbineIcon({ color, size = 14 }: { color: string; size?: number }) { diff --git a/frontend/src/components/korea/KoreaAirportLayer.tsx b/frontend/src/components/korea/KoreaAirportLayer.tsx index a95a18d..5c95573 100644 --- a/frontend/src/components/korea/KoreaAirportLayer.tsx +++ b/frontend/src/components/korea/KoreaAirportLayer.tsx @@ -1,8 +1,8 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Marker, Popup } from 'react-map-gl/maplibre'; -import { KOREAN_AIRPORTS } from '../services/airports'; -import type { KoreanAirport } from '../services/airports'; +import { KOREAN_AIRPORTS } from '../../services/airports'; +import type { KoreanAirport } from '../../services/airports'; export function KoreaAirportLayer() { const [selected, setSelected] = useState(null); diff --git a/frontend/src/components/korea/KoreaMap.tsx b/frontend/src/components/korea/KoreaMap.tsx index 2443e36..3a5d0c3 100644 --- a/frontend/src/components/korea/KoreaMap.tsx +++ b/frontend/src/components/korea/KoreaMap.tsx @@ -14,11 +14,11 @@ import { NavWarningLayer } from './NavWarningLayer'; import { OsintMapLayer } from './OsintMapLayer'; import { EezLayer } from './EezLayer'; import { PiracyLayer } from './PiracyLayer'; -import { fetchKoreaInfra } from '../services/infra'; -import type { PowerFacility } from '../services/infra'; -import type { Ship, Aircraft, SatellitePosition } from '../types'; -import type { OsintItem } from '../services/osint'; -import { countryLabelsGeoJSON } from '../data/countryLabels'; +import { fetchKoreaInfra } from '../../services/infra'; +import type { PowerFacility } from '../../services/infra'; +import type { Ship, Aircraft, SatellitePosition } from '../../types'; +import type { OsintItem } from '../../services/osint'; +import { countryLabelsGeoJSON } from '../../data/countryLabels'; import 'maplibre-gl/dist/maplibre-gl.css'; export interface KoreaFiltersState { diff --git a/frontend/src/components/korea/NavWarningLayer.tsx b/frontend/src/components/korea/NavWarningLayer.tsx index f8bdf2b..4015b62 100644 --- a/frontend/src/components/korea/NavWarningLayer.tsx +++ b/frontend/src/components/korea/NavWarningLayer.tsx @@ -1,8 +1,8 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Marker, Popup } from 'react-map-gl/maplibre'; -import { NAV_WARNINGS, NW_LEVEL_LABEL, NW_ORG_LABEL } from '../services/navWarning'; -import type { NavWarning, NavWarningLevel, TrainingOrg } from '../services/navWarning'; +import { NAV_WARNINGS, NW_LEVEL_LABEL, NW_ORG_LABEL } from '../../services/navWarning'; +import type { NavWarning, NavWarningLevel, TrainingOrg } from '../../services/navWarning'; const LEVEL_COLOR: Record = { danger: '#ef4444', diff --git a/frontend/src/components/korea/OsintMapLayer.tsx b/frontend/src/components/korea/OsintMapLayer.tsx index 2fa3d6d..bf2c616 100644 --- a/frontend/src/components/korea/OsintMapLayer.tsx +++ b/frontend/src/components/korea/OsintMapLayer.tsx @@ -1,7 +1,7 @@ import { useState, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { Marker, Popup } from 'react-map-gl/maplibre'; -import type { OsintItem } from '../services/osint'; +import type { OsintItem } from '../../services/osint'; const CAT_COLOR: Record = { maritime_accident: '#ef4444', diff --git a/frontend/src/components/korea/PiracyLayer.tsx b/frontend/src/components/korea/PiracyLayer.tsx index 89bc2e8..a575c53 100644 --- a/frontend/src/components/korea/PiracyLayer.tsx +++ b/frontend/src/components/korea/PiracyLayer.tsx @@ -1,8 +1,8 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Marker, Popup } from 'react-map-gl/maplibre'; -import { PIRACY_ZONES, PIRACY_LEVEL_COLOR, PIRACY_LEVEL_LABEL } from '../services/piracy'; -import type { PiracyZone } from '../services/piracy'; +import { PIRACY_ZONES, PIRACY_LEVEL_COLOR, PIRACY_LEVEL_LABEL } from '../../services/piracy'; +import type { PiracyZone } from '../../services/piracy'; function SkullIcon({ color, size }: { color: string; size: number }) { return ( diff --git a/frontend/src/components/korea/SubmarineCableLayer.tsx b/frontend/src/components/korea/SubmarineCableLayer.tsx index f832d3d..5be99a8 100644 --- a/frontend/src/components/korea/SubmarineCableLayer.tsx +++ b/frontend/src/components/korea/SubmarineCableLayer.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { Marker, Popup, Source, Layer } from 'react-map-gl/maplibre'; -import { KOREA_SUBMARINE_CABLES, KOREA_LANDING_POINTS } from '../services/submarineCable'; -import type { SubmarineCable } from '../services/submarineCable'; +import { KOREA_SUBMARINE_CABLES, KOREA_LANDING_POINTS } from '../../services/submarineCable'; +import type { SubmarineCable } from '../../services/submarineCable'; export function SubmarineCableLayer() { const [selectedCable, setSelectedCable] = useState(null); diff --git a/frontend/src/components/layers/AircraftLayer.tsx b/frontend/src/components/layers/AircraftLayer.tsx index 173157d..874852d 100644 --- a/frontend/src/components/layers/AircraftLayer.tsx +++ b/frontend/src/components/layers/AircraftLayer.tsx @@ -1,7 +1,7 @@ import { memo, useMemo, useState, useEffect } from 'react'; import { Marker, Popup, Source, Layer } from 'react-map-gl/maplibre'; import { useTranslation } from 'react-i18next'; -import type { Aircraft, AircraftCategory } from '../types'; +import type { Aircraft, AircraftCategory } from '../../types'; interface Props { aircraft: Aircraft[]; diff --git a/frontend/src/components/layers/DamagedShipLayer.tsx b/frontend/src/components/layers/DamagedShipLayer.tsx index faa577f..6b79ec4 100644 --- a/frontend/src/components/layers/DamagedShipLayer.tsx +++ b/frontend/src/components/layers/DamagedShipLayer.tsx @@ -1,7 +1,7 @@ import { useMemo, useState } from 'react'; import { Marker, Popup } from 'react-map-gl/maplibre'; -import { damagedShips } from '../data/damagedShips'; -import type { DamagedShip } from '../data/damagedShips'; +import { damagedShips } from '../../data/damagedShips'; +import type { DamagedShip } from '../../data/damagedShips'; interface Props { currentTime: number; diff --git a/frontend/src/components/layers/SatelliteLayer.tsx b/frontend/src/components/layers/SatelliteLayer.tsx index 0f247b3..b5c1dde 100644 --- a/frontend/src/components/layers/SatelliteLayer.tsx +++ b/frontend/src/components/layers/SatelliteLayer.tsx @@ -1,7 +1,7 @@ import { memo, useMemo, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { Marker, Popup, Source, Layer } from 'react-map-gl/maplibre'; -import type { SatellitePosition } from '../types'; +import type { SatellitePosition } from '../../types'; interface Props { satellites: SatellitePosition[]; diff --git a/frontend/src/components/layers/ShipLayer.tsx b/frontend/src/components/layers/ShipLayer.tsx index 5bd7292..addd5fe 100644 --- a/frontend/src/components/layers/ShipLayer.tsx +++ b/frontend/src/components/layers/ShipLayer.tsx @@ -1,7 +1,7 @@ import { memo, useMemo, useState, useEffect } from 'react'; import { Marker, Popup, Source, Layer, useMap } from 'react-map-gl/maplibre'; import { useTranslation } from 'react-i18next'; -import type { Ship, ShipCategory } from '../types'; +import type { Ship, ShipCategory } from '../../types'; import maplibregl from 'maplibre-gl'; interface Props {