1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

show message to non-Web3 users

This commit is contained in:
Matthias Kretschmann 2019-04-05 15:45:44 +02:00
parent 1e1dac4f8f
commit ec91010604
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -7,7 +7,7 @@ export default class Popover extends PureComponent<{
style: React.CSSProperties style: React.CSSProperties
}> { }> {
public render() { public render() {
const { account, balance, network } = this.context const { account, balance, network, isWeb3 } = this.context
return ( return (
<div <div
className={styles.popover} className={styles.popover}
@ -31,15 +31,22 @@ export default class Popover extends PureComponent<{
</div> </div>
)} )}
<div className={styles.popoverInfoline}> {!isWeb3 ? (
{account ? ( <div className={styles.popoverInfoline}>
<span className={styles.address} title={account}> No Web3 detected. Use a browser with MetaMask installed
{account} to publish assets.
</span> </div>
) : ( ) : (
<em>No account selected</em> <div className={styles.popoverInfoline}>
)} {account ? (
</div> <span className={styles.address} title={account}>
{account}
</span>
) : (
<em>No account selected</em>
)}
</div>
)}
<div className={styles.popoverInfoline}> <div className={styles.popoverInfoline}>
{network && network} {network && network}