diff --git a/client/src/components/organisms/AssetsUser.module.scss b/client/src/components/organisms/AssetsUser.module.scss index ec2d705..30f2798 100644 --- a/client/src/components/organisms/AssetsUser.module.scss +++ b/client/src/components/organisms/AssetsUser.module.scss @@ -17,3 +17,9 @@ display: block; margin-top: $spacer / 2; } + +.empty { + text-align: center; + margin-top: $spacer; + color: $brand-grey-light; +} diff --git a/client/src/components/organisms/AssetsUser.tsx b/client/src/components/organisms/AssetsUser.tsx index a38adb2..6f22513 100644 --- a/client/src/components/organisms/AssetsUser.tsx +++ b/client/src/components/organisms/AssetsUser.tsx @@ -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 ( -
- {this.props.recent && ( -

Your Latest Data Sets

- )} + this.context.account && ( +
+ {this.props.recent && ( +

+ Your Latest Data Sets +

+ )} {this.state.isLoading ? (