알림목록 지표없음 문제 수정
This commit is contained in:
@@ -11,7 +11,9 @@ import {
|
||||
loadStrategy,
|
||||
runBacktest,
|
||||
type PaperSummaryDto,
|
||||
type StrategyDto,
|
||||
} from '../utils/backendApi';
|
||||
import { prefetchNotificationStrategies } from '../utils/resolveNotificationStrategy';
|
||||
import { loadAnalysisCandles } from '../utils/analysisChartData';
|
||||
import { buildChartBacktestReportModel } from '../utils/backtestReportModel';
|
||||
import { candleTypeToTimeframe } from '../utils/strategyToChartIndicators';
|
||||
@@ -145,6 +147,7 @@ export const TradeNotificationListPage: React.FC<Props> = ({
|
||||
const [gridPreset, setGridPreset] = useState<TradeNotificationGridPresetId>(
|
||||
() => loadTradeNotificationGridPreset(),
|
||||
);
|
||||
const [strategies, setStrategies] = useState<StrategyDto[]>([]);
|
||||
const [selectedMarket, setSelectedMarket] = useState(defaultMarket);
|
||||
const [selectedId, setSelectedId] = useState<string | null>(null);
|
||||
const [reportOpen, setReportOpen] = useState(false);
|
||||
@@ -177,6 +180,14 @@ export const TradeNotificationListPage: React.FC<Props> = ({
|
||||
void refreshPaperData();
|
||||
}, [refreshPaperData]);
|
||||
|
||||
useEffect(() => {
|
||||
let cancelled = false;
|
||||
void prefetchNotificationStrategies().then(list => {
|
||||
if (!cancelled) setStrategies(list);
|
||||
});
|
||||
return () => { cancelled = true; };
|
||||
}, []);
|
||||
|
||||
const tradePrice = useMemo(
|
||||
() => coerceFiniteNumber(tickers?.get(selectedMarket)?.tradePrice),
|
||||
[tickers, selectedMarket],
|
||||
@@ -433,6 +444,7 @@ export const TradeNotificationListPage: React.FC<Props> = ({
|
||||
theme={theme}
|
||||
layoutMode={listLayout}
|
||||
itemTag="div"
|
||||
prefetchedStrategies={strategies}
|
||||
isSelected={selectedId === item.id}
|
||||
chartsEnabled={isListView}
|
||||
chartLiveReceiveHighlight={chartLiveReceiveHighlight}
|
||||
@@ -465,6 +477,7 @@ export const TradeNotificationListPage: React.FC<Props> = ({
|
||||
handleReportFromAlert,
|
||||
reportLoadingId,
|
||||
tickers,
|
||||
strategies,
|
||||
]);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user