import useTradeHistory from '../hooks/useTradeHistory' import { Table, Thead, Tbody, Tr, Th, Td } from 'react-super-responsive-table' import SideBadge from './SideBadge' // 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.size} {trade.price} {trade.liquidity} {trade.feeCost} {trade.loadTimestamp ? new Date(trade.loadTimestamp).toLocaleDateString() : 'Recent'}
) : (
No trade history
)}
) } export default TradeHistoryTable