update pay ui

This commit is contained in:
2025-12-17 17:45:42 +08:00
parent 697c366e88
commit 542e1c6225
3 changed files with 35 additions and 16 deletions

View File

@@ -83,12 +83,14 @@ const CompanyIndex: React.FC = () => {
} = useCompanyData({ stockCode });
// 事件追踪 Hook
const {
trackStockSearched,
trackTabChanged,
trackWatchlistAdded,
trackWatchlistRemoved,
} = useCompanyEvents({ stockCode });
const companyEvents = useCompanyEvents({ stockCode }) as {
trackStockSearched: (newCode: string, oldCode: string | null) => void;
trackTabChanged: (index: number, name: string, prevIndex: number) => void;
trackWatchlistAdded: (code: string) => void;
trackWatchlistRemoved: (code: string) => void;
};
const { trackStockSearched, trackTabChanged, trackWatchlistAdded, trackWatchlistRemoved } = companyEvents;
// 股票代码变化追踪
useEffect(() => {