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