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

17 lines
425 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import View from './view';
const mapStateToProps = ({ show }) => {
let props = {};
// select asset info
const request = show.assetRequests[show.request.id];
const assetKey = `a#${request.name}#${request.claimId}`;
const asset = show.assetList[assetKey];
if (asset) {
props['asset'] = asset;
};
return props;
2018-02-05 01:40:28 +01:00
};
export default connect(mapStateToProps, null)(View);