import ActiveAccount from '@lume/shared/accounts/active'; import InactiveAccount from '@lume/shared/accounts/inactive'; import BellIcon from '@lume/shared/icons/bell'; import PlusIcon from '@lume/shared/icons/plus'; import { APP_VERSION } from '@lume/stores/constants'; import { getAccounts, getActiveAccount } from '@lume/utils/storage'; import useSWR from 'swr'; const allFetcher = () => getAccounts(); const fetcher = () => getActiveAccount(); export default function MultiAccounts() { const { data: accounts }: any = useSWR('allAccounts', allFetcher); const { data: activeAccount }: any = useSWR('activeAccount', fetcher); return (
<> {!activeAccount ? (
) : ( )}
<> {!accounts ? (
) : ( accounts.map((account: { is_active: number; pubkey: string }) => ( )) )}
Lume v{APP_VERSION}
); }