From c4a365a0e836852f3bb6a41999e0b06b429cf139 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Fri, 24 Jun 2016 11:40:50 -0400 Subject: [PATCH] Connect `TeacherBanner` to redux whoops! Thanks @rschamp. Fixes #611 --- src/components/teacher-banner/teacher-banner.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/teacher-banner/teacher-banner.jsx b/src/components/teacher-banner/teacher-banner.jsx index c4d2d59fa..d50dc4343 100644 --- a/src/components/teacher-banner/teacher-banner.jsx +++ b/src/components/teacher-banner/teacher-banner.jsx @@ -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;