mars-v2-frontend/src/components/Account/AccountMenu.tsx
Linkie Link cfd7fb3073
Pre migration adjustments (#506)
* fix: added close button to accountDetails

* fix: fixed the AccountList to load async

* fix: fixed the heart size on the AccountStats

* fix: added AccountDetails loading state

* feat: added migration banner

* fix: fixed tests
2023-09-25 20:17:43 +02:00

23 lines
628 B
TypeScript

import { Suspense } from 'react'
import AccountMenuContent from 'components/Account/AccountMenuContent'
import Loading from 'components/Loading'
import useAccountIds from 'hooks/useAccountIds'
import useStore from 'store'
function Content() {
const address = useStore((s) => s.address)
const { data: accountIds, isLoading } = useAccountIds(address)
if (isLoading) return <Loading className='h-8 w-35' />
if (!accountIds) return null
return <AccountMenuContent />
}
export default function AccountMenu() {
return (
<Suspense fallback={<Loading className='h-8 w-35' />}>
<Content />
</Suspense>
)
}