spee.ch/react/containers/ShowAsset/index.js

26 lines
662 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import View from './view';
2018-02-03 03:16:18 +01:00
import { updateAssetClaimData } from 'actions/show';
const mapStateToProps = ({ show }) => {
return {
modifier : show.assetRequest.modifier,
claim : show.assetRequest.name,
extension: show.assetRequest.extension,
2018-02-03 03:16:18 +01:00
claimData: show.showAsset.claimData,
};
};
2018-02-03 03:16:18 +01:00
const mapDispatchToProps = dispatch => {
return {
onAssetClaimDataUpdate: (claimData) => {
dispatch(updateAssetClaimData(claimData));
},
onAssetClaimDataClear: () => {
dispatch(updateAssetClaimData(null));
},
};
};
export default connect(mapStateToProps, mapDispatchToProps)(View);