mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 09:35:56 -05:00
Redirect to /educators/classes
if a confirmed teacher
Fixes #757. Note: Because we are getting this info from the session, the redirect may not happen until the page is rendered first in cases where the connection is slow, or the db is slow.
This commit is contained in:
parent
1c7dc73ed7
commit
60a62bb374
1 changed files with 8 additions and 1 deletions
|
@ -762,9 +762,16 @@ module.exports = {
|
|||
getDefaultProps: function () {
|
||||
return {
|
||||
email: null,
|
||||
invited: false
|
||||
invited: false,
|
||||
confirmed: false,
|
||||
educator: true
|
||||
};
|
||||
},
|
||||
componentWillReceiveProps: function (nextProps) {
|
||||
if (nextProps.educator && nextProps.confirmed) {
|
||||
window.location.href = '/educators/classes/';
|
||||
}
|
||||
},
|
||||
render: function () {
|
||||
return (
|
||||
<Slide className="registration-step last-step">
|
||||
|
|
Loading…
Reference in a new issue