spee.ch/react/containers/ShowChannel/index.js
2018-02-01 18:42:03 -08:00

27 lines
649 B
JavaScript

import { connect } from 'react-redux';
import View from './view';
import {updateChannelData} from 'actions/show';
const mapStateToProps = ({ show }) => {
return {
request: {
name: show.request.channel.name,
id : show.request.channel.id,
},
channel: {
name : show.channel.name,
shortId: show.channel.shortId,
longId : show.channel.longId,
},
};
};
const mapDispatchToProps = dispatch => {
return {
onChannelDataChange: (name, longId, shortId) => {
dispatch(updateChannelData(name, longId, shortId));
},
};
};
export default connect(mapStateToProps, mapDispatchToProps)(View);