2018-02-03 03:16:18 +01:00
|
|
|
import { connect } from 'react-redux';
|
2018-02-14 18:19:22 +01:00
|
|
|
import { onUpdateChannelClaims } from 'actions/show';
|
2018-02-03 03:16:18 +01:00
|
|
|
import View from './view';
|
|
|
|
|
2018-02-09 01:42:13 +01:00
|
|
|
const mapStateToProps = ({ show }) => {
|
2018-02-13 03:18:56 +01:00
|
|
|
// select channel key
|
2018-02-14 21:19:43 +01:00
|
|
|
const request = show.requestList[show.request.id];
|
2018-02-14 21:09:57 +01:00
|
|
|
const channelKey = request.key;
|
2018-02-13 03:18:56 +01:00
|
|
|
// select channel claims
|
2018-02-13 04:01:29 +01:00
|
|
|
const channel = show.channelList[channelKey] || null;
|
|
|
|
// return props
|
|
|
|
return {
|
|
|
|
channelKey,
|
|
|
|
channel,
|
2018-02-03 03:16:18 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2018-02-14 20:39:24 +01:00
|
|
|
const mapDispatchToProps = {
|
|
|
|
onUpdateChannelClaims,
|
2018-02-09 19:02:13 +01:00
|
|
|
};
|
2018-02-03 03:16:18 +01:00
|
|
|
|
2018-02-09 19:02:13 +01:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(View);
|