import { useCallback, useState } from 'react' import { CurrencyDollarIcon, ExternalLinkIcon, LinkIcon, } from '@heroicons/react/outline' import useMangoStore from '../stores/useMangoStore' import { abbreviateAddress } from '../utils' import useMarginInfo from '../hooks/useMarginInfo' import PageBodyContainer from '../components/PageBodyContainer' import TopBar from '../components/TopBar' import AccountAssets from '../components/account-page/AccountAssets' import AccountBorrows from '../components/account-page/AccountBorrows' import AccountOrders from '../components/account-page/AccountOrders' import AccountHistory from '../components/account-page/AccountHistory' import AccountsModal from '../components/AccountsModal' import EmptyState from '../components/EmptyState' const TABS = [ 'Assets', 'Borrows', // 'Stats', // 'Positions', 'Orders', 'History', ] export default function Account() { const [activeTab, setActiveTab] = useState(TABS[0]) const [showAccountsModal, setShowAccountsModal] = useState(false) const accountMarginInfo = useMarginInfo() const connected = useMangoStore((s) => s.wallet.connected) const selectedMarginAccount = useMangoStore( (s) => s.selectedMarginAccount.current ) const handleTabChange = (tabName) => { setActiveTab(tabName) } const handleCloseAccounts = useCallback(() => { setShowAccountsModal(false) }, []) return (