Commit 60a62bb3 authored by Matthew Taylor's avatar Matthew Taylor

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.
parent 1c7dc73e
......@@ -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">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment