spee.ch/react/components/ShowAssetLite/index.js

31 lines
813 B
JavaScript
Raw Normal View History

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-02-07 04:00:52 +01:00
import AssetDisplay from 'containers/AssetDisplay';
class ShowLite extends React.Component {
render () {
2018-02-07 07:54:06 +01:00
const { error, claimData: { name, claimId } } = this.props;
return (
<div className="row row--tall flex-container--column flex-container--center-center">
2018-02-07 07:54:06 +01:00
{error &&
<p>{error}</p>
2018-01-31 00:32:42 +01:00
}
{this.props.claimData &&
2018-01-31 00:32:42 +01:00
<div>
2018-02-07 07:54:06 +01:00
<AssetDisplay />
<Link id="asset-boilerpate" className="link--primary fine-print" to={`/${claimId}/${name}`}>hosted via Spee.ch</Link>
2018-01-31 00:32:42 +01:00
</div>
}
</div>
);
}
};
2018-02-05 01:40:28 +01:00
ShowLite.propTypes = {
error : PropTypes.string,
claimData: PropTypes.object.isRequired,
};
export default ShowLite;