import React, { ReactElement } from 'react' import styles from './index.module.css' import classNames from 'classnames/bind' import Loader from '../atoms/Loader' import { useUserPreferences } from '@context/UserPreferences' import AccountTeaser from '@shared/AccountTeaser/AccountTeaser' const cx = classNames.bind(styles) function LoaderArea() { return (
) } declare type AccountListProps = { accounts: AccountTeaserVM[] isLoading: boolean className?: string } export default function AccountList({ accounts, isLoading, className }: AccountListProps): ReactElement { const { chainIds } = useUserPreferences() const styleClasses = cx({ accountList: true, [className]: className }) return accounts && (isLoading === undefined || isLoading === false) ? ( <>
{accounts.length > 0 ? ( accounts.map((account, index) => ( )) ) : chainIds.length === 0 ? (
No network selected.
) : (
No results found.
)}
) : ( ) }