cloudux-starter-kit
Version:
Starter kit for UX developers in MediaCentral - NPM package
37 lines (30 loc) • 874 B
JavaScript
/**
* Copyright 2017-2019 by Avid Technology, Inc.
*/
import React from 'react';
import {connect} from 'react-redux';
import PropTypes from 'prop-types';
import MainPane from '../components/MainPane';
import actionTypes from '../redux/actions/actionTypes';
import {makeAction} from '../redux/actions/makeAction';
class PaneContainer extends React.Component {
render() {
return (
<MainPane token={this.props.token} exampleAction={this.props.exampleAction}/>
);
}
}
PaneContainer.propTypes = {
token: PropTypes.bool.isRequired,
exampleAction: PropTypes.func.isRequired,
};
const mapStateToProps = (state) => ({
token: state.example.token,
});
const mapDispatchToProps = {
exampleAction: makeAction(actionTypes.EXAMPLE_ACTION),
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(PaneContainer);