Commit f2310170 authored by Matthew Taylor's avatar Matthew Taylor

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.
parent 16fe86b2
......@@ -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 () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment