import { ActiveAccount } from "@shared/accounts/active"; import { InactiveAccount } from "@shared/accounts/inactive"; import { BellIcon, PlusIcon } from "@shared/icons"; import { APP_VERSION } from "@stores/constants"; import { getAccounts, getActiveAccount } from "@utils/storage"; import useSWR from "swr"; const allFetcher = () => getAccounts(); const fetcher = () => getActiveAccount(); export 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}
); }