import { useCallback, useState } from 'react' import Link from 'next/link' import { abbreviateAddress } from '../utils/index' import useLocalStorageState from '../hooks/useLocalStorageState' 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 LanguageSwitch from './LanguageSwitch' import { DEFAULT_MARKET_KEY, initialMarket } from './SettingsModal' // import { useRouter } from 'next/router' import { useTranslation } from 'next-i18next' const TopBar = () => { const { t } = useTranslation('common') // const router = useRouter() // const { pathname, asPath, query } = router const mangoAccount = useMangoStore((s) => s.selectedMangoAccount.current) const connected = useMangoStore((s) => s.wallet.connected) const [showAccountsModal, setShowAccountsModal] = useState(false) const [defaultMarket] = useLocalStorageState( DEFAULT_MARKET_KEY, initialMarket ) // const handleLocaleChange = (lang) => { // router.push({ pathname, query }, asPath, { locale: lang }) // } const handleCloseAccounts = useCallback(() => { setShowAccountsModal(false) }, []) return ( <> {showAccountsModal ? ( ) : null} ) } export default TopBar