2018-01-30 18:00:02 +01:00
|
|
|
import React from 'react';
|
2018-02-05 01:40:28 +01:00
|
|
|
import PropTypes from 'prop-types';
|
2018-01-31 00:32:42 +01:00
|
|
|
import { Link } from 'react-router-dom';
|
2018-01-30 18:00:02 +01:00
|
|
|
import AssetDisplay from 'components/AssetDisplay';
|
|
|
|
|
2018-01-31 02:15:23 +01:00
|
|
|
class ShowLite extends React.Component {
|
2018-01-30 18:00:02 +01:00
|
|
|
render () {
|
|
|
|
return (
|
|
|
|
<div className="row row--tall flex-container--column flex-container--center-center">
|
2018-01-31 02:15:23 +01:00
|
|
|
{this.props.error &&
|
|
|
|
<p>{this.props.error}</p>
|
2018-01-31 00:32:42 +01:00
|
|
|
}
|
2018-01-31 02:15:23 +01:00
|
|
|
{this.props.claimData &&
|
2018-01-31 00:32:42 +01:00
|
|
|
<div>
|
|
|
|
<AssetDisplay
|
2018-02-01 23:29:33 +01:00
|
|
|
name={this.props.claimData.name}
|
|
|
|
claimId={this.props.claimData.claimId}
|
2018-02-02 04:36:08 +01:00
|
|
|
src={`/${this.props.claimData.claimId}/${this.props.claimData.name}.${this.props.claimData.fileExt}`}
|
2018-02-01 23:29:33 +01:00
|
|
|
contentType={this.props.claimData.contentType}
|
|
|
|
fileExt={this.props.claimData.fileExt}
|
|
|
|
thumbnail={this.props.claimData.thumbnail}
|
2018-01-31 00:32:42 +01:00
|
|
|
/>
|
2018-01-31 02:15:23 +01:00
|
|
|
<Link id="asset-boilerpate" className="link--primary fine-print" to={`/${this.props.claimData.claimId}/${this.props.claimData.name}`}>hosted via Spee.ch</Link>
|
2018-01-31 00:32:42 +01:00
|
|
|
</div>
|
|
|
|
}
|
2018-01-30 18:00:02 +01:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-02-05 01:40:28 +01:00
|
|
|
ShowLite.propTypes = {
|
|
|
|
error : PropTypes.string,
|
|
|
|
claimData: PropTypes.object.isRequired,
|
|
|
|
};
|
|
|
|
|
2018-01-31 02:15:23 +01:00
|
|
|
export default ShowLite;
|