fix: LIVE 모드 더미 피격선박 제거 + 선박 분류/배지 색상 통일
- DamagedShipLayer: 시나리오 범위(3/1~3/14) 밖이면 피격선박 미표시 - getMarineTrafficCategory: VesselType 문자열 매칭 우선 (Cargo→fishing 오분류 수정) - EventLog 배지 색상: CSS 변수 통일 (LayerPanel/ShipLayer와 동일) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
부모
ff860ba639
커밋
60edd6bcfd
@ -34,12 +34,19 @@ function formatKST(ts: number): string {
|
||||
return `${d.getUTCMonth() + 1}/${d.getUTCDate()} ${String(d.getUTCHours()).padStart(2, '0')}:${String(d.getUTCMinutes()).padStart(2, '0')} KST`;
|
||||
}
|
||||
|
||||
// 리플레이 시나리오 시간 범위 (T0 ~ T0+13일)
|
||||
// 이 범위 밖의 currentTime이면 더미 데이터를 표시하지 않음 (LIVE 모드 대응)
|
||||
const SCENARIO_START = new Date('2026-03-01T00:00:00Z').getTime();
|
||||
const SCENARIO_END = new Date('2026-03-14T00:00:00Z').getTime();
|
||||
|
||||
export function DamagedShipLayer({ currentTime }: Props) {
|
||||
const [selectedId, setSelectedId] = useState<string | null>(null);
|
||||
|
||||
const isScenarioTime = currentTime >= SCENARIO_START && currentTime <= SCENARIO_END;
|
||||
|
||||
const visible = useMemo(
|
||||
() => damagedShips.filter(s => currentTime >= s.damagedAt),
|
||||
[currentTime],
|
||||
() => isScenarioTime ? damagedShips.filter(s => currentTime >= s.damagedAt) : [],
|
||||
[currentTime, isScenarioTime],
|
||||
);
|
||||
|
||||
const selected = selectedId ? visible.find(s => s.id === selectedId) ?? null : null;
|
||||
|
||||
불러오는 중...
Reference in New Issue
Block a user