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