import React, { PureComponent } from 'react'
import Button from '../atoms/Button'
import AccountStatus from '../molecules/AccountStatus'
import styles from './Web3message.module.scss'
import { User } from '../../context/User'
export default class Web3message extends PureComponent {
public render() {
return (
{states =>
!states.isWeb3
? this.noWeb3()
: !states.isLogged
? this.unlockAccount(states)
: states.isLogged
? this.haveAccount(states.account)
: null
}
)
}
public noWeb3() {
return (
No Web3 Browser. For
publishing an asset you need to{' '}
setup MetaMask
{' '}
or use any other Web3-capable plugin or browser.
)
}
public unlockAccount(states: any) {
return (
Account locked. For
publishing an asset you need to unlock your Web3 account.
)
}
public haveAccount(account: string) {
return (
Connected with
account
{`${account && account.substring(0, 20)}...`}
)
}
}