2018-02-02 03:42:03 +01:00
|
|
|
import { connect } from 'react-redux';
|
2018-02-03 03:16:18 +01:00
|
|
|
import {updateChannelData} from 'actions/show';
|
2018-02-02 03:42:03 +01:00
|
|
|
import View from './view';
|
|
|
|
|
|
|
|
const mapStateToProps = ({ show }) => {
|
|
|
|
return {
|
2018-02-02 21:46:18 +01:00
|
|
|
requestName: show.channelRequest.name,
|
|
|
|
requestId : show.channelRequest.id,
|
2018-02-03 03:16:18 +01:00
|
|
|
name : show.showChannel.channelData.name,
|
|
|
|
shortId : show.showChannel.channelData.shortId,
|
|
|
|
longId : show.showChannel.channelData.longId,
|
2018-02-02 03:42:03 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-02-03 03:16:18 +01:00
|
|
|
const mapDispatchToProps = dispatch => {
|
|
|
|
return {
|
|
|
|
onChannelDataUpdate: (name, longId, shortId) => {
|
|
|
|
dispatch(updateChannelData(name, longId, shortId));
|
|
|
|
},
|
|
|
|
onChannelDataClear: () => {
|
|
|
|
dispatch(updateChannelData(null, null, null));
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(View);
|