import React from 'react' interface IconProps { width?: number height?: number className?: string } // Binance SVG 图标组件 const BinanceIcon: React.FC = ({ width = 24, height = 24, className, }) => ( ) // Hyperliquid SVG 图标组件 const HyperliquidIcon: React.FC = ({ width = 24, height = 24, className, }) => ( ) // Aster SVG 图标组件 const AsterIcon: React.FC = ({ width = 24, height = 24, className, }) => ( ) // 获取交易所图标的函数 export const getExchangeIcon = ( exchangeType: string, props: IconProps = {} ) => { // 支持完整ID或类型名 const type = exchangeType.toLowerCase().includes('binance') ? 'binance' : exchangeType.toLowerCase().includes('hyperliquid') ? 'hyperliquid' : exchangeType.toLowerCase().includes('aster') ? 'aster' : exchangeType.toLowerCase() const iconProps = { width: props.width || 24, height: props.height || 24, className: props.className, } switch (type) { case 'binance': case 'cex': return case 'hyperliquid': case 'dex': return case 'aster': return default: return (
{type[0]?.toUpperCase() || '?'}
) } }