Add permissions dispatch for WillReceiveProps

We still need `componentWillMount` to handle the initial render for a logged in teacher first visting the page. Fixes issue in which a teacher would not see the banner immediately after dynamic login.
This commit is contained in:
Matthew Taylor 2016-06-28 13:30:36 -04:00
parent 16fe86b2fd
commit f2310170b2

View file

@ -62,8 +62,13 @@ var Splash = injectIntl(React.createClass({
}
}
},
componentWillReceiveProps: function () {
// Determine whether to show the teacher banner or not
this.props.dispatch(permissionsActions.getPermissions());
},
componentWillMount: function () {
// Determine whether to show the teacher banner or not
// Needed still for initial render
this.props.dispatch(permissionsActions.getPermissions());
},
componentDidMount: function () {