added props to asset preview
This commit is contained in:
parent
091d073d01
commit
da32c35403
2 changed files with 8 additions and 4 deletions
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue