테블릿 로딩 이슈 수정
This commit is contained in:
+24
-9
@@ -689,8 +689,9 @@ function App() {
|
||||
}, [symbol]);
|
||||
|
||||
useEffect(() => {
|
||||
if (appSettingsLoaded) refreshPaperAccount();
|
||||
}, [appSettingsLoaded, refreshPaperAccount]);
|
||||
if (!appSettingsLoaded || !formalLogin) return;
|
||||
refreshPaperAccount();
|
||||
}, [appSettingsLoaded, formalLogin, refreshPaperAccount]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!appSettingsLoaded || !appDefaults.fcmPushEnabled) return;
|
||||
@@ -702,8 +703,9 @@ function App() {
|
||||
}, [appSettingsLoaded, appDefaults.fcmPushEnabled]);
|
||||
|
||||
useEffect(() => {
|
||||
if (appSettingsLoaded && paperTradingEnabled) refreshPaperAccount(symbol);
|
||||
}, [symbol, appSettingsLoaded, paperTradingEnabled, refreshPaperAccount]);
|
||||
if (!appSettingsLoaded || !formalLogin || !paperTradingEnabled) return;
|
||||
refreshPaperAccount(symbol);
|
||||
}, [symbol, appSettingsLoaded, formalLogin, paperTradingEnabled, refreshPaperAccount]);
|
||||
|
||||
const [alerts, setAlerts] = useState<Array<{ price: number; label: string }>>(
|
||||
(initial.alertPrices ?? []).map(p => ({ price: p, label: '' }))
|
||||
@@ -808,8 +810,12 @@ function App() {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (!formalLogin) {
|
||||
setActiveLiveSettings([]);
|
||||
return;
|
||||
}
|
||||
refreshActiveLiveSettings();
|
||||
}, [refreshActiveLiveSettings, isVirtualActive, virtualMonitoredMarkets.join(','), virtualSession.executionType, virtualSession.positionMode]);
|
||||
}, [formalLogin, refreshActiveLiveSettings, isVirtualActive, virtualMonitoredMarkets.join(','), virtualSession.executionType, virtualSession.positionMode]);
|
||||
|
||||
useEffect(() => {
|
||||
const onVirtualChanged = () => refreshActiveLiveSettings();
|
||||
@@ -818,7 +824,7 @@ function App() {
|
||||
}, [refreshActiveLiveSettings]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!appSettingsLoaded) return;
|
||||
if (!appSettingsLoaded || !formalLogin) return;
|
||||
if (isVirtualActive) {
|
||||
const active = activeLiveSettings.find(s => s.market === symbol);
|
||||
setLiveStrategyCandleTypes(active?.strategyCandleTypes);
|
||||
@@ -827,7 +833,7 @@ function App() {
|
||||
loadLiveStrategySettings(symbol)
|
||||
.then(s => setLiveStrategyCandleTypes(s.strategyCandleTypes))
|
||||
.catch(() => { /* optional */ });
|
||||
}, [symbol, appSettingsLoaded, appDefaults.liveStrategyId, isVirtualActive, activeLiveSettings]);
|
||||
}, [symbol, appSettingsLoaded, formalLogin, appDefaults.liveStrategyId, isVirtualActive, activeLiveSettings]);
|
||||
|
||||
const liveStrategySettings: LiveStrategySettingsDto = useMemo(() => {
|
||||
if (isVirtualActive) {
|
||||
@@ -876,6 +882,10 @@ function App() {
|
||||
}, [monitoredMarkets, activeLiveSettings, marketSubscriptions, liveStrategyCandleTypes]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!formalLogin) {
|
||||
setMarketSubscriptions([]);
|
||||
return;
|
||||
}
|
||||
if (monitoredMarkets.length === 0) {
|
||||
setMarketSubscriptions([]);
|
||||
return;
|
||||
@@ -893,7 +903,7 @@ function App() {
|
||||
loadActiveLiveStrategySettings()
|
||||
.then(list => setMarketSubscriptions(expandLiveStrategySubscriptions(list)))
|
||||
.catch(() => { /* liveStompSubscriptions 폴백 */ });
|
||||
}, [isVirtualActive, appDefaults.liveStrategyCheck, appDefaults.liveStrategyId, monitoredMarkets.join(','), activeLiveSettings]);
|
||||
}, [formalLogin, isVirtualActive, appDefaults.liveStrategyCheck, appDefaults.liveStrategyId, monitoredMarkets.join(','), activeLiveSettings]);
|
||||
|
||||
const handleLiveSettingsChange = useCallback((saved: LiveStrategySettingsDto) => {
|
||||
if (isVirtualActive) return;
|
||||
@@ -998,8 +1008,12 @@ function App() {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (!formalLogin) {
|
||||
setLiveStrategies([]);
|
||||
return;
|
||||
}
|
||||
refreshLiveStrategies();
|
||||
}, [menuPage, showLivePanel, refreshLiveStrategies]);
|
||||
}, [menuPage, showLivePanel, formalLogin, refreshLiveStrategies]);
|
||||
|
||||
const liveNotifierRef = useRef<LiveSignalNotifierHandle>(null);
|
||||
const clearLiveMarkers = useCallback(() => {
|
||||
@@ -2653,6 +2667,7 @@ function App() {
|
||||
onOpenChange={isMobile ? setMobileRightOpen : undefined}
|
||||
activeTab={isMobile ? mobileRightTab : undefined}
|
||||
onTabChange={isMobile ? setMobileRightTab : undefined}
|
||||
wsFeedEnabled={chartScreenActive && useUpbit}
|
||||
market={chartSymbol}
|
||||
tradePrice={chartTicker?.tradePrice ?? null}
|
||||
asks={orderbook.asks}
|
||||
|
||||
Reference in New Issue
Block a user