mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-15 00:36:56 +08:00
fix: 修复 showBinanceGuide 状态作用域错误
- 从父组件 AITradersPage 移除未使用的状态声明(第56行) - 在子组件 ExchangeConfigModal 内添加本地状态(第1168行) - 修复 TypeScript 编译错误(TS6133, TS2304) 问题:状态在父组件声明但在子组件使用,导致跨作用域引用错误 影响:前端编译失败,Docker build 报错 解决:将状态声明移至实际使用的子组件内 此修复将自动更新 PR #467
This commit is contained in:
@@ -53,7 +53,6 @@ export function AITradersPage({ onTraderSelect }: AITradersPageProps) {
|
|||||||
coinPoolUrl: '',
|
coinPoolUrl: '',
|
||||||
oiTopUrl: ''
|
oiTopUrl: ''
|
||||||
});
|
});
|
||||||
const [showBinanceGuide, setShowBinanceGuide] = useState(false);
|
|
||||||
|
|
||||||
const { data: traders, mutate: mutateTraders } = useSWR<TraderInfo[]>(
|
const { data: traders, mutate: mutateTraders } = useSWR<TraderInfo[]>(
|
||||||
user && token ? 'traders' : null,
|
user && token ? 'traders' : null,
|
||||||
@@ -1165,6 +1164,9 @@ function ExchangeConfigModal({
|
|||||||
const [testnet, setTestnet] = useState(false);
|
const [testnet, setTestnet] = useState(false);
|
||||||
const [showGuide, setShowGuide] = useState(false);
|
const [showGuide, setShowGuide] = useState(false);
|
||||||
|
|
||||||
|
// 币安配置指南展开状态
|
||||||
|
const [showBinanceGuide, setShowBinanceGuide] = useState(false);
|
||||||
|
|
||||||
// Hyperliquid 特定字段
|
// Hyperliquid 特定字段
|
||||||
const [hyperliquidWalletAddr, setHyperliquidWalletAddr] = useState('');
|
const [hyperliquidWalletAddr, setHyperliquidWalletAddr] = useState('');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user