import ActiveAccount from '@lume/shared/accounts/active'; import InactiveAccount from '@lume/shared/accounts/inactive'; import LumeIcon from '@lume/shared/icons/lume'; import { APP_VERSION } from '@lume/stores/constants'; import { getAccounts } from '@lume/utils/storage'; import { Plus } from 'iconoir-react'; import useSWR from 'swr'; const fetcher = () => getAccounts(); export default function MultiAccounts() { const { data, error }: any = useSWR('allAccounts', fetcher); return (
<> {error &&
failed to load
} {!data ? (
) : ( data.map((account: { is_active: number; pubkey: string }) => { if (account.is_active === 1) { return ; } else { return ; } }) )}
Lume v{APP_VERSION}
); }