import PropTypes from 'prop-types'; import { ConnectButton as RainbowBtn } from '@rainbow-me/rainbowkit'; import { Button } from './Button'; import defaultAvatar from '../../assets/avatar.svg'; import { usePrimaryName } from '../../hooks/usePrimaryName'; const Custom = ({ account, chain, openAccountModal, openChainModal, openConnectModal, }) => { const { name, avatar } = usePrimaryName(); const connected = account && chain; if (!connected) { return ; } if (chain.unsupported) { return ( ); } return ( ); }; Custom.propTypes = { account: PropTypes.object, chain: PropTypes.object, openAccountModal: PropTypes.func, openChainModal: PropTypes.func, openConnectModal: PropTypes.func, }; export const ConnectButton = () => { return {Custom}; };