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

16 lines
384 B
JavaScript
Raw Normal View History

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