From 409d13b961bdfdef2f59b77f91ffda86a6dfa302 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 15 Feb 2019 16:48:43 +0100 Subject: [PATCH] user assets list with new Asset component --- .../molecules/AssetsUser.module.scss | 15 ++++++++++++++ src/components/molecules/AssetsUser.tsx | 20 +++++++------------ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/components/molecules/AssetsUser.module.scss b/src/components/molecules/AssetsUser.module.scss index 73e708a..1266f66 100644 --- a/src/components/molecules/AssetsUser.module.scss +++ b/src/components/molecules/AssetsUser.module.scss @@ -11,6 +11,21 @@ } } +.assets { + display: grid; + grid-template-columns: 1fr; + grid-gap: $spacer; + max-width: 100%; + + @media (min-width: $break-point--small) { + grid-template-columns: 2fr 2fr; + } + + @media (min-width: $break-point--medium) { + grid-template-columns: 2fr 2fr 2fr; + } +} + .subTitle { font-size: $font-size-h4; color: $brand-grey-light; diff --git a/src/components/molecules/AssetsUser.tsx b/src/components/molecules/AssetsUser.tsx index f99f042..dfc1e82 100644 --- a/src/components/molecules/AssetsUser.tsx +++ b/src/components/molecules/AssetsUser.tsx @@ -1,5 +1,6 @@ import React, { PureComponent } from 'react' import { Link } from 'react-router-dom' +import Asset from '../molecules/Asset' import styles from './AssetsUser.module.scss' export default class AssetsUser extends PureComponent { @@ -16,7 +17,7 @@ export default class AssetsUser extends PureComponent { query: { // TODO: query all assets published by current active account $text: { - $search: 'account ID' + $search: 'zoid' } } } @@ -24,24 +25,17 @@ export default class AssetsUser extends PureComponent { this.setState({ results: assets }) } - // TODO: this should be removed and replaced by Asset.tsx component - private renderAssetBox = (asset: any) => { - const { metadata } = asset.findServiceByType('Metadata') - return ( - -
{metadata.base.name}
-
{metadata.base.description}
- - ) - } - public render() { return (

Your Data Sets

{this.state.results.length ? ( - this.state.results.map(asset => this.renderAssetBox(asset)) +
+ {this.state.results.map((asset, index) => ( + + ))} +
) : (

None yet.