mobile download

This commit is contained in:
Macbook
2026-05-28 14:44:19 +09:00
parent e2816b037f
commit 3503ef33f5
152 changed files with 11021 additions and 687 deletions
+37
View File
@@ -0,0 +1,37 @@
import { useEffect } from 'react';
import { loadVirtualTargets, loadVirtualSession } from '@frontend/utils/virtualTradingStorage';
import { useLiveStrategyMarkers } from '@frontend/hooks/useLiveStrategyMarkers';
import { useTradeNotification } from '../contexts/TradeNotificationContext';
/** 가상매매 대상 종목 STOMP 시그널 → 알림 Context */
export default function LiveSignalBridge() {
const { addNotification, refreshHistory } = useTradeNotification();
const targets = loadVirtualTargets();
const session = loadVirtualSession();
const markets = targets.map(t => t.market);
useLiveStrategyMarkers({
markets,
activeMarket: markets[0] ?? 'KRW-BTC',
enabled: session.running && markets.length > 0,
onMarkersChange: () => {},
onSignal: marker => {
addNotification({
market: marker.market,
signalType: marker.signal,
price: marker.price,
candleTime: marker.time,
candleType: marker.candleType ?? '1m',
});
window.setTimeout(() => { void refreshHistory(); }, 800);
},
});
useEffect(() => {
if (!session.running) return;
const id = window.setInterval(() => { void refreshHistory(); }, 20000);
return () => window.clearInterval(id);
}, [session.running, refreshHistory]);
return null;
}