mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
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:
parent
16fe86b2fd
commit
f2310170b2
1 changed files with 5 additions and 0 deletions
|
@ -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 () {
|
||||
|
|
Loading…
Reference in a new issue