22 lines
552 B
JavaScript
22 lines
552 B
JavaScript
import { connect } from 'react-redux';
|
|
import { onUpdateChannelClaims } from 'actions/show';
|
|
import View from './view';
|
|
|
|
const mapStateToProps = ({ show }) => {
|
|
// select channel key
|
|
const request = show.previousRequests[show.request.id];
|
|
const channelKey = request.key;
|
|
// select channel claims
|
|
const channel = show.channelList[channelKey] || null;
|
|
// return props
|
|
return {
|
|
channelKey,
|
|
channel,
|
|
};
|
|
};
|
|
|
|
const mapDispatchToProps = {
|
|
onUpdateChannelClaims,
|
|
};
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(View);
|