Merge pull request #614 from mewtaylor/issue/gh-611-teacher-banner

Fix GH-611: Connect `TeacherBanner` to redux
This commit is contained in:
Matthew Taylor 2016-06-27 22:40:13 -04:00 committed by GitHub
commit 91de6f7912

View file

@ -1,4 +1,5 @@
var classNames = require('classnames');
var connect = require('react-redux').connect;
var React = require('react');
var sessionActions = require('../../redux/session.js');
@ -71,4 +72,12 @@ var TeacherBanner = React.createClass({
}
});
module.exports = TeacherBanner;
var mapStateToProps = function (state) {
return {
session: state.session
};
};
var ConnectedTeacherBanner = connect(mapStateToProps)(TeacherBanner);
module.exports = ConnectedTeacherBanner;