d4652b3dd8
* enable strict mode and fix resulting type errors * fix print affected command * remove assign-deep and use lodash/merge, fix some type errors after enabling strict mode
29 lines
541 B
TypeScript
29 lines
541 B
TypeScript
import { useWeb3React } from '@web3-react/core';
|
|
import { Web3Container } from '../../../components/web3-container';
|
|
|
|
const Deposit = () => {
|
|
return (
|
|
<Web3Container>
|
|
<div>
|
|
<h1>Deposit</h1>
|
|
<Info />
|
|
</div>
|
|
</Web3Container>
|
|
);
|
|
};
|
|
|
|
const Info = () => {
|
|
const { isActive, chainId, account } = useWeb3React();
|
|
if (!isActive) {
|
|
return <div>Not active</div>;
|
|
}
|
|
return (
|
|
<div>
|
|
<p>{chainId}</p>
|
|
<p>{account ? account : 'No account'}</p>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Deposit;
|