mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
Merge branch 'AD-499-whitelabel-prize-with-sluice-as-k' of bitbucket.org:ascribe/onion into AD-499-whitelabel-prize-with-sluice-as-k
This commit is contained in:
commit
188f8ebf9c
@ -56,7 +56,8 @@ let LoginForm = React.createClass({
|
|||||||
|
|
||||||
// if user is already logged in, redirect him to piece list
|
// if user is already logged in, redirect him to piece list
|
||||||
if(this.state.currentUser && this.state.currentUser.email && this.props.redirectOnLoggedIn) {
|
if(this.state.currentUser && this.state.currentUser.email && this.props.redirectOnLoggedIn) {
|
||||||
this.transitionTo('pieces');
|
// FIXME: hack to redirect out of the dispatch cycle
|
||||||
|
window.setTimeout(() => this.transitionTo('pieces'), 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -41,7 +41,8 @@ let PieceList = React.createClass({
|
|||||||
|
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
if (this.props.redirectTo && this.state.pieceListCount === 0) {
|
if (this.props.redirectTo && this.state.pieceListCount === 0) {
|
||||||
this.transitionTo(this.props.redirectTo);
|
// FIXME: hack to redirect out of the dispatch cycle
|
||||||
|
window.setTimeout(() => this.transitionTo(this.props.redirectTo), 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user