X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/fe5d65e4e704358fab18d91dae5a97ff7659f5df..ccf093578f01b3d8ac0c421f85063939b3cd271d:/src/views-components/api-token/api-token.tsx diff --git a/src/views-components/api-token/api-token.tsx b/src/views-components/api-token/api-token.tsx index 43c55a92..b78e7192 100644 --- a/src/views-components/api-token/api-token.tsx +++ b/src/views-components/api-token/api-token.tsx @@ -16,6 +16,7 @@ import { initSessions } from "~/store/auth/auth-action-session"; interface ApiTokenProps { authService: AuthService; config: Config; + loadMainApp: boolean; } export const ApiToken = connect()( @@ -23,15 +24,18 @@ export const ApiToken = connect()( componentDidMount() { const search = this.props.location ? this.props.location.search : ""; const apiToken = getUrlParameter(search, 'api_token'); + const loadMainApp = this.props.loadMainApp; this.props.dispatch(saveApiToken(apiToken)); this.props.dispatch(getUserDetails()).then((user: User) => { this.props.dispatch(initSessions(this.props.authService, this.props.config, user)); }).finally(() => { - this.props.dispatch(navigateToRootProject); + if (loadMainApp) { + this.props.dispatch(navigateToRootProject); + } }); } render() { - return
; + return
; } } );