mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Merge pull request #761 from mewtaylor/issue/gh-757
Fix GH-757: Redirect to `/educators/classes` if a confirmed teacher
This commit is contained in:
commit
f4c60a915b
2 changed files with 7 additions and 1 deletions
|
@ -762,7 +762,8 @@ module.exports = {
|
|||
getDefaultProps: function () {
|
||||
return {
|
||||
email: null,
|
||||
invited: false
|
||||
invited: false,
|
||||
confirmed: false
|
||||
};
|
||||
},
|
||||
render: function () {
|
||||
|
|
|
@ -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 || {};
|
||||
|
|
Loading…
Reference in a new issue