import React from 'react' import { formatEther } from '@ethersproject/units' import { useEtherBalance, useEthers } from '@usedapp/core' import { Container, ContentBlock, ContentRow, MainContent, Section, SectionRow } from '../components/base/base' import { Label } from '../typography/Label' import { TextInline } from '../typography/Text' import { Title } from '../typography/Title' import { Web3ReactConnectorButton } from '../components/account/Web3ReactConnectorButton' const STAKING_CONTRACT = '0x00000000219ab540356cBB839Cbe05303d7705Fa' export function Web3ReactConnector() { const { account } = useEthers() const userBalance = useEtherBalance(account) const stakingBalance = useEtherBalance(STAKING_CONTRACT) return (
Web3React Connectors Usage Example {stakingBalance && ( {formatEther(stakingBalance)}{' '} )} {account && ( {account} )} {userBalance && ( {formatEther(userBalance)} )}
) }