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

show web3 message on asset loading failure

This commit is contained in:
Matthias Kretschmann 2019-09-24 14:32:15 +02:00
parent 33b14bc8e3
commit 97a5f39b5e
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 12 additions and 1 deletions

View File

@ -9,4 +9,11 @@
width: fit-content; width: fit-content;
color: $brand-white; color: $brand-white;
font-weight: $font-weight-bold; font-weight: $font-weight-bold;
&,
+ div {
max-width: 30rem;
margin-left: auto;
margin-right: auto;
}
} }

View File

@ -9,6 +9,7 @@ import Content from '../../atoms/Content'
import CategoryImage from '../../atoms/CategoryImage' import CategoryImage from '../../atoms/CategoryImage'
import styles from './index.module.scss' import styles from './index.module.scss'
import withTracker from '../../../hoc/withTracker' import withTracker from '../../../hoc/withTracker'
import Web3message from '../../organisms/Web3message'
interface AssetProps { interface AssetProps {
match: { match: {
@ -61,7 +62,10 @@ class Asset extends Component<AssetProps, AssetState> {
<Spinner message="Loading asset..." /> <Spinner message="Loading asset..." />
</div> </div>
) : hasError ? ( ) : hasError ? (
<div className={styles.error}>{error}</div> <Content>
<div className={styles.error}>{error}</div>
<Web3message />
</Content>
) : ( ) : (
<Route <Route
title={metadata.base.name} title={metadata.base.name}