Move to the view

thanks @rschamp!
This commit is contained in:
Matthew Taylor 2016-07-26 17:03:41 -04:00
parent 60a62bb374
commit 806fd25e46
2 changed files with 6 additions and 7 deletions

View file

@ -763,15 +763,9 @@ module.exports = {
return {
email: null,
invited: false,
confirmed: false,
educator: true
confirmed: false
};
},
componentWillReceiveProps: function (nextProps) {
if (nextProps.educator && nextProps.confirmed) {
window.location.href = '/educators/classes/';
}
},
render: function () {
return (
<Slide className="registration-step last-step">

View file

@ -10,6 +10,11 @@ require('./teacherwaitingroom.scss');
var TeacherWaitingRoom = React.createClass({
displayName: 'TeacherWaitingRoom',
componentWillReceiveProps: function (nextProps) {
if (nextProps.session.permissions.educator && nextProps.session.permissions.social) {
window.location.href = '/educators/classes/';
}
},
render: function () {
var permissions = this.props.session.permissions || {};
var user = this.props.session.user || {};