mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-12 15:26:55 +08:00
chore: remove ~100 debug console.log statements from frontend
Cleaned up verbose debug logging left from development:
- AdvancedChart.tsx: removed ~50 debug logs (time parsing, order fetching, marker creation)
- ChartWithOrders.tsx: removed debug logs and unused klineMinTime/klineMaxTime variables
- ChartWithOrdersSimple.tsx: removed data loading debug logs
- ChartTabs.tsx: removed render/selection debug logs
- ComparisonChart.tsx: removed equity history debug logs
- AITradersPage.tsx: removed 🔥 DEBUG logs from handleSaveEditTrader
- App.tsx: removed mount debug log
Kept legitimate console.error/console.warn for actual error handling.
This commit is contained in:
@@ -21,7 +21,6 @@ export function ChartWithOrdersSimple({
|
||||
|
||||
useEffect(() => {
|
||||
const loadData = async () => {
|
||||
console.log('[ChartSimple] Loading data for', symbol, interval, 'trader:', traderID)
|
||||
setLoading(true)
|
||||
setError(null)
|
||||
|
||||
@@ -30,24 +29,20 @@ export function ChartWithOrdersSimple({
|
||||
const limit = 100
|
||||
const klineUrl = `/api/klines?symbol=${symbol}&interval=${interval}&limit=${limit}`
|
||||
|
||||
console.log('[ChartSimple] Fetching klines from our service:', klineUrl)
|
||||
const klineResult = await httpClient.get(klineUrl)
|
||||
|
||||
if (!klineResult.success || !klineResult.data) {
|
||||
throw new Error('Failed to fetch klines from our service')
|
||||
}
|
||||
|
||||
console.log('[ChartSimple] Received klines:', klineResult.data.length)
|
||||
setKlineCount(klineResult.data.length)
|
||||
|
||||
// 测试获取订单数据
|
||||
if (traderID) {
|
||||
const tradesUrl = `/api/trades?trader_id=${traderID}&symbol=${symbol}&limit=100`
|
||||
console.log('[ChartSimple] Fetching trades from:', tradesUrl)
|
||||
const tradesResult = await httpClient.get(tradesUrl)
|
||||
|
||||
if (tradesResult.success && tradesResult.data) {
|
||||
console.log('[ChartSimple] Received trades:', tradesResult.data.length)
|
||||
setOrderCount(tradesResult.data.length)
|
||||
} else {
|
||||
console.warn('[ChartSimple] Failed to fetch trades:', tradesResult.message || 'Unknown error', tradesResult)
|
||||
|
||||
Reference in New Issue
Block a user