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

fix user assets listing

This commit is contained in:
Matthias Kretschmann 2019-03-26 11:46:57 +01:00
parent 4977b28f1b
commit 2715acb2fb
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 20 additions and 7 deletions

View File

@ -17,3 +17,9 @@
display: block; display: block;
margin-top: $spacer / 2; margin-top: $spacer / 2;
} }
.empty {
text-align: center;
margin-top: $spacer;
color: $brand-grey-light;
}

View File

@ -17,6 +17,7 @@ export default class AssetsUser extends PureComponent<
} }
private async searchOcean() { private async searchOcean() {
if (this.context.account) {
this.context.ocean.keeper.didRegistry.contract.getPastEvents( this.context.ocean.keeper.didRegistry.contract.getPastEvents(
'DIDAttributeRegistered', 'DIDAttributeRegistered',
{ {
@ -42,11 +43,17 @@ export default class AssetsUser extends PureComponent<
) )
} }
this.setState({ isLoading: false })
}
public render() { public render() {
return ( return (
this.context.account && (
<div className={styles.assetsUser}> <div className={styles.assetsUser}>
{this.props.recent && ( {this.props.recent && (
<h2 className={styles.subTitle}>Your Latest Data Sets</h2> <h2 className={styles.subTitle}>
Your Latest Data Sets
</h2>
)} )}
{this.state.isLoading ? ( {this.state.isLoading ? (