/** * 전략 평가 — 전략편집기 전체 화면 팝업 */ import React, { Suspense, lazy, useEffect } from 'react'; import type { Theme } from '../../types'; const StrategyEditorPage = lazy(() => import('../StrategyEditorPage')); interface Props { theme: Theme; initialStrategyId?: number | null; onClose: () => void; onStrategiesChanged?: () => void; } export default function StrategyEditorModal({ theme, initialStrategyId = null, onClose, onStrategiesChanged, }: Props) { useEffect(() => { const prev = document.body.style.overflow; document.body.style.overflow = 'hidden'; const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') onClose(); }; window.addEventListener('keydown', onKey); return () => { document.body.style.overflow = prev; window.removeEventListener('keydown', onKey); }; }, [onClose]); return (