import React, { FC, useState, useMemo, useCallback } from 'react'; import { Button, Grid, Modal, Text } from '@nextui-org/react'; import { useWallet } from '../../hooks'; import WalletConnectButton from '../WalletConnectButton'; import useModal from '../../hooks/useModal'; interface Props {} const ModalConnect: FC = () => { const { bindings, setVisible } = useModal(); const { installedWallets, loadableWallets, undetectedWallets } = useWallet(); const [showMore, setShowMore] = useState(false); const readyWallets = useMemo( () => installedWallets.concat(loadableWallets), [installedWallets, loadableWallets] ); const close = useCallback(() => setVisible(false), [setVisible]); return (
Connect your Wallet {readyWallets.map((wallet) => ( ))} {showMore && undetectedWallets.map((wallet) => ( ))}
); }; export default ModalConnect;