1
0
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:
Tim Daubenschütz 2015-07-14 23:54:00 +02:00
commit 188f8ebf9c
2 changed files with 4 additions and 2 deletions

View File

@ -56,7 +56,8 @@ let LoginForm = React.createClass({
// if user is already logged in, redirect him to piece list
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);
}
},

View File

@ -41,7 +41,8 @@ let PieceList = React.createClass({
componentDidUpdate() {
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);
}
},