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:
parent
4977b28f1b
commit
2715acb2fb
@ -17,3 +17,9 @@
|
||||
display: block;
|
||||
margin-top: $spacer / 2;
|
||||
}
|
||||
|
||||
.empty {
|
||||
text-align: center;
|
||||
margin-top: $spacer;
|
||||
color: $brand-grey-light;
|
||||
}
|
||||
|
@ -17,6 +17,7 @@ export default class AssetsUser extends PureComponent<
|
||||
}
|
||||
|
||||
private async searchOcean() {
|
||||
if (this.context.account) {
|
||||
this.context.ocean.keeper.didRegistry.contract.getPastEvents(
|
||||
'DIDAttributeRegistered',
|
||||
{
|
||||
@ -35,19 +36,25 @@ export default class AssetsUser extends PureComponent<
|
||||
`did:op:${event.returnValues._did.substring(2)}`
|
||||
)
|
||||
results.push(ddo)
|
||||
}
|
||||
this.setState({ results, isLoading: false })
|
||||
}
|
||||
this.setState({ results, isLoading: false })
|
||||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
this.setState({ isLoading: false })
|
||||
}
|
||||
|
||||
public render() {
|
||||
return (
|
||||
<div className={styles.assetsUser}>
|
||||
{this.props.recent && (
|
||||
<h2 className={styles.subTitle}>Your Latest Data Sets</h2>
|
||||
)}
|
||||
this.context.account && (
|
||||
<div className={styles.assetsUser}>
|
||||
{this.props.recent && (
|
||||
<h2 className={styles.subTitle}>
|
||||
Your Latest Data Sets
|
||||
</h2>
|
||||
)}
|
||||
|
||||
{this.state.isLoading ? (
|
||||
<Spinner />
|
||||
|
Loading…
Reference in New Issue
Block a user