2018-02-01 23:29:33 +01:00
|
|
|
import { connect } from 'react-redux';
|
2018-02-02 20:10:58 +01:00
|
|
|
import { updateRequestWithChannelRequest, updateRequestWithAssetRequest } from 'actions/show';
|
2018-02-01 23:29:33 +01:00
|
|
|
import View from './view';
|
|
|
|
|
|
|
|
const mapStateToProps = ({ show }) => {
|
|
|
|
return {
|
2018-02-07 19:52:09 +01:00
|
|
|
requestType: show.request.type,
|
2018-02-01 23:29:33 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
const mapDispatchToProps = dispatch => {
|
|
|
|
return {
|
2018-02-02 20:10:58 +01:00
|
|
|
onChannelRequest: (name, id) => {
|
|
|
|
dispatch(updateRequestWithChannelRequest(name, id));
|
2018-02-01 23:29:33 +01:00
|
|
|
},
|
2018-02-02 20:10:58 +01:00
|
|
|
onAssetRequest: (name, id, channelName, channelId, extension) => {
|
|
|
|
dispatch(updateRequestWithAssetRequest(name, id, channelName, channelId, extension));
|
2018-02-01 23:29:33 +01:00
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(View);
|