From eef63cbb8fac6c810cf263d49b151f5800e08918 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 7 May 2026 05:04:30 +0000 Subject: [PATCH] chore(web): tighten event handler types --- web/src/components/ChatControl.tsx | 17 ++++++------- web/src/components/Login.tsx | 4 ++-- web/src/components/ResetPassword.tsx | 3 ++- .../components/strategy/VisualRuleBuilder.tsx | 15 ++++++------ web/src/tabs/PositionsTab.tsx | 13 +++++----- web/src/views/ScreenerView.tsx | 7 +++--- web/src/views/SimpleView.tsx | 24 +++++++++---------- 7 files changed, 44 insertions(+), 39 deletions(-) diff --git a/web/src/components/ChatControl.tsx b/web/src/components/ChatControl.tsx index 8a45cb1..e441255 100644 --- a/web/src/components/ChatControl.tsx +++ b/web/src/components/ChatControl.tsx @@ -1,4 +1,5 @@ import { useState, useRef, useEffect, useMemo } from 'react'; +import type { ChangeEvent } from 'react'; import { createPortal } from 'react-dom'; import { tradingRuntime } from '../lib/runtime'; import { getPlatformAccessToken } from '../lib/authSession'; @@ -561,7 +562,7 @@ export const ChatControl = ({ profiles, onApplyProfile }: ChatControlProps) => {
Edit Parameters Before Apply
updateDraftField(msg.id, 'name', e.target.value)} + onChange={(e: ChangeEvent) => updateDraftField(msg.id, 'name', e.target.value)} placeholder="Profile Name" className="w-full rounded-lg px-2.5 py-1.5 text-[11px] outline-none" style={inputStyle} @@ -572,7 +573,7 @@ export const ChatControl = ({ profiles, onApplyProfile }: ChatControlProps) => { min="0" step="1" value={activeProfileData?.allocated_capital ?? ''} - onChange={(e) => updateDraftField(msg.id, 'allocated_capital', e.target.value)} + onChange={(e: ChangeEvent) => updateDraftField(msg.id, 'allocated_capital', e.target.value)} placeholder="Capital" className="w-full rounded-lg px-2.5 py-1.5 text-[11px] outline-none" style={inputStyle} @@ -582,7 +583,7 @@ export const ChatControl = ({ profiles, onApplyProfile }: ChatControlProps) => { min="0" step="0.1" value={activeProfileData?.risk_per_trade_percent ?? ''} - onChange={(e) => updateDraftField(msg.id, 'risk_per_trade_percent', e.target.value)} + onChange={(e: ChangeEvent) => updateDraftField(msg.id, 'risk_per_trade_percent', e.target.value)} placeholder="Risk %" className="w-full rounded-lg px-2.5 py-1.5 text-[11px] outline-none" style={inputStyle} @@ -590,7 +591,7 @@ export const ChatControl = ({ profiles, onApplyProfile }: ChatControlProps) => { updateDraftField(msg.id, 'symbols', e.target.value)} + onChange={(e: ChangeEvent) => updateDraftField(msg.id, 'symbols', e.target.value)} placeholder="Symbols (e.g. BTC/USDT,ETH/USDT)" className="w-full rounded-lg px-2.5 py-1.5 text-[11px] outline-none" style={inputStyle} @@ -599,7 +600,7 @@ export const ChatControl = ({ profiles, onApplyProfile }: ChatControlProps) => { Auto Trading