전략편집기 화면접속 시 에러 수정

This commit is contained in:
Macbook
2026-05-31 23:36:33 +09:00
parent 2f5316d172
commit a34b49c23a
4 changed files with 96 additions and 29 deletions
+8 -5
View File
@@ -129,6 +129,7 @@ import type { ChartRealtimeSource } from './hooks/useChartRealtimeData';
import { VIRTUAL_SESSION_CHANGED_EVENT } from './utils/virtualTradingStorage';
import { notifyPaperTradesChanged } from './utils/paperTradeEvents';
import { useIsMobile, useIsCompactDevice } from './hooks/useMediaQuery';
import { isTickerFeedPage } from './utils/tickerFeedPages';
import MobileChartDock from './components/MobileChartDock';
import LoginModal from './components/LoginModal';
import AppDownloadModal from './components/AppDownloadModal';
@@ -241,15 +242,17 @@ function App() {
const chartVisible = menuPage === 'chart';
const isMobile = useIsMobile();
const isCompactDevice = useIsCompactDevice();
const tickerFeedActive = isTickerFeedPage(menuPage);
const priorityMarketsRef = useRef<string[]>([symbol]);
const getPriorityMarkets = useCallback(() => priorityMarketsRef.current, []);
/** lite=모바일·태블릿(Upbit 직접 REST 최소). loadFull=마켓 패널 열림 시 백엔드 일괄 */
/** enabled=차트·매매 화면만. lite=태블릿. loadFull=마켓 패널 열림 */
const marketTickerOpts = useMemo(() => ({
enabled: tickerFeedActive,
lite: isCompactDevice,
loadFull: showMarketPanel,
loadFull: showMarketPanel && tickerFeedActive,
getPriorityMarkets,
}), [isCompactDevice, showMarketPanel, getPriorityMarkets]);
}), [tickerFeedActive, isCompactDevice, showMarketPanel, getPriorityMarkets]);
const { tickers: marketTickers, loading: marketLoading, usdRate } = useMarketTicker(marketTickerOpts);
// ── 레이아웃 상태 ─────────────────────────────────────────────────────
@@ -1156,9 +1159,9 @@ function App() {
useMemo(() => ({
onTickUpdate: handleTickUpdate,
onNewCandle: handleNewCandle,
enabled: useUpbit,
enabled: chartScreenActive && useUpbit,
source: chartRealtimeSource as 'BACKEND_STOMP' | 'UPBIT_DIRECT',
}), [handleTickUpdate, handleNewCandle, useUpbit, chartRealtimeSource]),
}), [handleTickUpdate, handleNewCandle, chartScreenActive, useUpbit, chartRealtimeSource]),
);
// 실제로 차트에 넘길 bars (초기 200개, 실시간 수신 후에도 변경 없음)