Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scratch-www
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
scratch-www
Commits
73564626
Commit
73564626
authored
Aug 02, 2016
by
Ray Schamp
Committed by
GitHub
Aug 02, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #801 from rschamp/hotfix/waiting-room-loop
[Master] Only redirect approved educators to My Classes
parents
00c7dc92
a9039ca6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
src/views/teacherwaitingroom/teacherwaitingroom.jsx
src/views/teacherwaitingroom/teacherwaitingroom.jsx
+9
-8
No files found.
src/views/teacherwaitingroom/teacherwaitingroom.jsx
View file @
73564626
...
...
@@ -11,27 +11,28 @@ require('./teacherwaitingroom.scss');
var
TeacherWaitingRoom
=
React
.
createClass
({
displayName
:
'
TeacherWaitingRoom
'
,
componentWillReceiveProps
:
function
(
nextProps
)
{
if
(
nextProps
.
session
.
permissions
.
educator
&&
nextProps
.
session
.
permissions
.
social
)
{
if
(
nextProps
.
approved
)
{
window
.
location
.
href
=
'
/educators/classes/
'
;
}
},
render
:
function
()
{
var
permissions
=
this
.
props
.
session
.
permissions
||
{};
var
user
=
this
.
props
.
session
.
user
||
{};
return
(
<
Deck
className=
{
classNames
(
'
teacher-waitingroom
'
,
this
.
props
.
className
)
}
>
<
TeacherApprovalStep
confirmed=
{
permissions
.
social
}
invited=
{
permissions
.
educator_invitee
}
educator=
{
permissions
.
educator
}
email=
{
user
.
email
}
/>
<
TeacherApprovalStep
{
...
this
.
props
}
/>
</
Deck
>
);
}
});
var
mapStateToProps
=
function
(
state
)
{
var
permissions
=
state
.
session
.
session
.
permissions
||
{};
var
user
=
state
.
session
.
session
.
user
||
{};
return
{
session
:
state
.
session
.
session
approved
:
permissions
&&
permissions
.
educator
&&
!
permissions
.
educator_invitee
&&
permissions
.
social
,
confirmed
:
permissions
&&
permissions
.
social
,
invited
:
permissions
&&
permissions
.
educator_invitee
,
educator
:
permissions
&&
permissions
.
educator
,
email
:
user
&&
user
.
email
};
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment