2018-01-30 18:00:02 +01:00
|
|
|
import React from 'react';
|
|
|
|
import NavBar from 'containers/NavBar';
|
|
|
|
import AssetTitle from 'components/AssetTitle';
|
|
|
|
import AssetDisplay from 'components/AssetDisplay';
|
|
|
|
import AssetInfo from 'components/AssetInfo';
|
|
|
|
|
2018-01-31 02:15:23 +01:00
|
|
|
class ShowDetails extends React.Component {
|
2018-01-30 18:00:02 +01:00
|
|
|
componentDidMount () {
|
|
|
|
console.log(this.props);
|
|
|
|
}
|
|
|
|
render () {
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<NavBar/>
|
2018-01-31 02:15:23 +01:00
|
|
|
{this.props.error &&
|
2018-02-01 04:12:54 +01:00
|
|
|
<div className="row row--padded">
|
|
|
|
<p>{this.props.error}</p>
|
|
|
|
</div>
|
2018-01-31 02:15:23 +01:00
|
|
|
}
|
|
|
|
{this.props.claimData &&
|
|
|
|
<div className="row row--tall row--padded">
|
|
|
|
<div className="column column--10">
|
|
|
|
<AssetTitle title={this.props.claimData.title}/>
|
|
|
|
</div>
|
|
|
|
<div className="column column--5 column--sml-10 align-content-top">
|
|
|
|
<div className="row row--padded">
|
|
|
|
<AssetDisplay
|
2018-02-01 04:12:54 +01:00
|
|
|
name={this.props.claimData.name}
|
2018-01-31 02:15:23 +01:00
|
|
|
claimId={this.props.claimData.claimId}
|
2018-02-01 23:29:33 +01:00
|
|
|
src={`/${this.props.claimId}/${this.props.name}.${this.props.fileExt}`}
|
2018-02-01 06:08:28 +01:00
|
|
|
contentType={this.props.claimData.contentType}
|
|
|
|
fileExt={this.props.claimData.fileExt}
|
2018-02-01 23:29:33 +01:00
|
|
|
thumbnail={this.props.claimData.thumbnail}
|
2018-01-31 02:15:23 +01:00
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div><div className="column column--5 column--sml-10 align-content-top">
|
|
|
|
<div className="row row--padded">
|
2018-02-01 04:12:54 +01:00
|
|
|
<AssetInfo
|
|
|
|
channelName={this.props.claimData.channelName}
|
|
|
|
certificateId={this.props.claimData.certificateId}
|
|
|
|
description={this.props.claimData.description}
|
|
|
|
shortClaimId={this.props.claimData.shortClaimId}
|
|
|
|
name={this.props.claimData.name}
|
|
|
|
fileExt={this.props.claimData.fileExt}
|
|
|
|
claimId={this.props.claimData.claimId}
|
|
|
|
contentType={this.props.claimData.contentType}
|
|
|
|
thumbnail={this.props.claimData.thumbnail}
|
|
|
|
host={this.props.claimData.host}
|
|
|
|
/>
|
2018-01-31 02:15:23 +01:00
|
|
|
</div>
|
2018-01-30 18:00:02 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2018-01-31 02:15:23 +01:00
|
|
|
}
|
2018-01-30 18:00:02 +01:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-01-30 20:46:22 +01:00
|
|
|
// required props
|
|
|
|
// isChannel
|
|
|
|
// channelName
|
|
|
|
// channelClaimId
|
|
|
|
// claimId
|
|
|
|
// claimName
|
|
|
|
|
2018-01-31 02:15:23 +01:00
|
|
|
export default ShowDetails;
|