mirror of
https://github.com/ascribe/onion.git
synced 2025-01-12 14:00:24 +01:00
minor fixes for last commit
This commit is contained in:
parent
829f2c592b
commit
957d0c66c9
js/components
@ -57,7 +57,7 @@ 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) {
|
||||||
// FIXME: hack to redirect out of the dispatch cycle
|
// FIXME: hack to redirect out of the dispatch cycle
|
||||||
window.setTimeout(() => this.history.pushState(null, '/pieces');, 0);
|
window.setTimeout(() => this.history.pushState(null, '/pieces'), 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ let PieceList = React.createClass({
|
|||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
if (this.props.redirectTo && this.state.unfilteredPieceListCount === 0) {
|
if (this.props.redirectTo && this.state.unfilteredPieceListCount === 0) {
|
||||||
// FIXME: hack to redirect out of the dispatch cycle
|
// FIXME: hack to redirect out of the dispatch cycle
|
||||||
window.setTimeout(() => this.history.pushState(null, this.props.redirectTo, this.props.location.query);
|
window.setTimeout(() => this.history.pushState(null, this.props.redirectTo, this.props.location.query), 0);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user