import { useEffect, useState } from 'react' import mangoStore from '../../store/mangoStore' import TabButtons from '../shared/TabButtons' import TokenList from '../TokenList' import TradeHistoryTable from '../TradeHistoryTable' const AccountTabs = () => { const [activeTab, setActiveTab] = useState('tokens') const actions = mangoStore((s) => s.actions) const mangoAccount = mangoStore((s) => s.mangoAccount.current) const tradeHistory = mangoStore((s) => s.mangoAccount.stats.tradeHistory.data) const loading = mangoStore((s) => s.mangoAccount.stats.tradeHistory.loading) useEffect(() => { if (mangoAccount) { actions.fetchTradeHistory(mangoAccount.publicKey.toString()) } }, [actions, mangoAccount]) return ( <>
setActiveTab(v)} values={['tokens', 'trade-history']} large />
{activeTab === 'tokens' ? ( ) : ( )} ) } export default AccountTabs