import { useCallback, useState } from 'react' import Link from 'next/link' import { abbreviateAddress } from '../utils/index' import MenuItem from './MenuItem' import ThemeSwitch from './ThemeSwitch' import useMangoStore from '../stores/useMangoStore' import ConnectWalletButton from './ConnectWalletButton' import NavDropMenu from './NavDropMenu' import AccountsModal from './AccountsModal' import MobileMenu from './mobile/MobileMenu' const TopBar = () => { const mangoAccount = useMangoStore((s) => s.selectedMangoAccount.current) const [showAccountsModal, setShowAccountsModal] = useState(false) const handleCloseAccounts = useCallback(() => { setShowAccountsModal(false) }, []) return ( <> Trade Account Borrow Stats Learn {mangoAccount ? ( setShowAccountsModal(true)} > Account {mangoAccount.name ? mangoAccount.name : abbreviateAddress(mangoAccount.publicKey)} ) : null} {showAccountsModal ? ( ) : null} > ) } export default TopBar