Skip to content

Commit

Permalink
Prevent navigating to workspace/new on update
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-marcellini committed Apr 18, 2022
1 parent 3316204 commit fc2f02d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pages/LogInWithShortLivedTokenPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ class LogInWithShortLivedTokenPage extends Component {
}

Log.info('[LoginWithShortLivedTokenPage] User is signed in');
this.navigateToExitRoute();
}

componentDidUpdate() {
this.navigateToExitRoute();
}

navigateToExitRoute() {
// exitTo is URI encoded because it could contain a variable number of slashes (i.e. "workspace/new" vs "workspace/<ID>/card")
const exitTo = decodeURIComponent(lodashGet(this.props.route.params, 'exitTo', ''));
if (exitTo === ROUTES.WORKSPACE_NEW) {
Expand Down

0 comments on commit fc2f02d

Please sign in to comment.