import Link from 'next/link' import { AccountNavigation, AccountStatus } from 'components/Account' import Logo from 'components/Icons/logo.svg' import { menuTree, NavLink } from 'components/Navigation' import SearchInput from 'components/Navigation/SearchInput' import Wallet from 'components/Wallet/Wallet' import useCreditAccounts from 'hooks/useCreditAccounts' import { useAccountDetailsStore, useWalletStore } from 'stores' const Navigation = () => { const address = useWalletStore((s) => s.address) const selectedAccount = useAccountDetailsStore((s) => s.selectedAccount) const { data: creditAccountsList } = useCreditAccounts() const isConnected = !!address const hasCreditAccounts = creditAccountsList && creditAccountsList.length > 0 return (
{menuTree.map((item, index) => ( {item.label} ))}
{/* Sub navigation bar */}
{isConnected && hasCreditAccounts && ( )}
{isConnected && }
) } export default Navigation