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

17 lines
460 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import View from './view';
const mapStateToProps = ({ show }) => {
let props = {};
// select title
2018-02-12 19:01:29 -08:00
const previousRequest = show.assetRequests[show.request.id];
const assetKey = `a#${previousRequest.name}#${previousRequest.claimId}`;
2018-02-12 18:50:19 -08:00
const asset = show.assetList[assetKey];
if (asset) {
props['title'] = asset.claimData.title;
};
return props;
};
export default connect(mapStateToProps, null)(View);