mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
fix redirect
This commit is contained in:
parent
acd29b0cbe
commit
5f201ad76a
@ -45,7 +45,7 @@ let LoginForm = React.createClass({
|
|||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
UserStore.listen(this.onChange);
|
UserStore.listen(this.onChange);
|
||||||
let { redirect } = this.getQuery();
|
let { redirect } = this.getQuery();
|
||||||
if (redirect !== 'login'){
|
if (redirect && redirect !== 'login'){
|
||||||
this.transitionTo(redirect, null, this.getQuery());
|
this.transitionTo(redirect, null, this.getQuery());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -42,7 +42,7 @@ let SignupForm = React.createClass({
|
|||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
UserStore.listen(this.onChange);
|
UserStore.listen(this.onChange);
|
||||||
let { redirect } = this.getQuery();
|
let { redirect } = this.getQuery();
|
||||||
if (redirect !== 'signup'){
|
if (redirect && redirect !== 'signup'){
|
||||||
this.transitionTo(redirect, null, this.getQuery());
|
this.transitionTo(redirect, null, this.getQuery());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user