import useTradeHistory from '../hooks/useTradeHistory' // import useMangoStore from '../stores/useMangoStore' // import Loading from './Loading' const TradeHistoryTable = () => { const tradeHistory = useTradeHistory() // const connected = useMangoStore((s) => s.wallet.connected) return (
{tradeHistory && tradeHistory.length ? (
{tradeHistory.map((trade, index) => ( ))}
Market Side Size Price Liquidity Fees Date
{trade.marketName}
{trade.side.toUpperCase()}
{trade.size} {trade.price} {trade.liquidity} {trade.feeCost} {trade.loadTimestamp ? new Date(trade.loadTimestamp).toLocaleDateString() : 'Recent'}
) : (
No trade history
)}
) } export default TradeHistoryTable