Skip to content

Commit

Permalink
Invites: fix redirect after accepting invite
Browse files Browse the repository at this point in the history
  • Loading branch information
lezama committed Dec 3, 2015
1 parent 785b93a commit cc380b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions client/my-sites/invites/invite-accept-logged-in/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ export default React.createClass( {

accept() {
this.setState( { submitting: true } );
page( this.props.redirectTo );
acceptInvite( this.props.invite );
acceptInvite( this.props.invite, () => page( this.props.redirectTo ) );
},

render() {
Expand Down
2 changes: 1 addition & 1 deletion client/my-sites/invites/invite-accept/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default React.createClass( {
}
debug( 'Rendering invite' );
return user
? <LoggedIn { ...this.state.invite } decline={ this.decline } user={ user } />
? <LoggedIn { ...this.state.invite } redirectTo={ this.getRedirectAfterAccept() } decline={ this.decline } user={ user } />
: <LoggedOut { ...this.state.invite } redirectTo={ this.getRedirectAfterAccept() } decline={ this.decline } />;
},

Expand Down

0 comments on commit cc380b1

Please sign in to comment.