added props to asset preview

This commit is contained in:
bill bittner 2018-01-30 11:54:29 -08:00
parent 091d073d01
commit da32c35403
2 changed files with 8 additions and 4 deletions

View file

@ -1,10 +1,9 @@
import React from 'react';
const AssetPreview = ({asset}) => {
console.log('asset display info:', asset);
const AssetPreview = ({ name, claimId, contentType }) => {
return (
<div>
<p>Preview Asset here</p>
<p>name: {name}, claimId: {claimId}, contentType: {contentType}</p>
</div>
);
};

View file

@ -72,7 +72,12 @@ class ShowChannel extends React.Component {
<div className="column column--10">
<div>
{/* claims here */}
{this.state.claims && this.state.claims.map((claim, index) => <AssetPreview claim={claim} key={index} />)}
{this.state.claims && this.state.claims.map((claim, index) => <AssetPreview
name={claim.name}
claimId={claim.claimId}
contentType={claim.contentType}
key={index}
/>)}
</div>
</div>
</div>