import React from 'react' ; import Loader from 'react-loader-spinner' ; import { useInjectedConnector } from '../connectors/useMetaMaskConnector' ; import { isEthereumFromMetamask } from '../utils/ethereum' ; import { ConnectorProps } from '.' ; export const MetaMaskOrInjectedWallet = ( { onSubmit , } ) => { const isMetaMask = isEthereumFromMetamask ( ) ; const { error } = useInjectedConnector ( onSubmit , isMetaMask ) ; return ( < div className = "tw-flex tw-items-center tw-justify-center" > { error ? ( < p className = "tw-text-red-500 tw-pb-4" > { error . message } < /p>) : (<div className="tw-my-8 tw-flex tw-items-center tw-justify-center"> < Loader type = "TailSpin" color = "#666666" height = "60px" width = "60px" / > < /div>)} < /div>); } ;