X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/c75768d4dfcc49eadf410077390ef8c281261594..d53a08ea0cc9a9af1a3071969d41165e8a6ff5d5:/src/views/workbench/fed-login.tsx diff --git a/src/views/workbench/fed-login.tsx b/src/views/workbench/fed-login.tsx index c64778a3..595f136b 100644 --- a/src/views/workbench/fed-login.tsx +++ b/src/views/workbench/fed-login.tsx @@ -2,13 +2,12 @@ // // SPDX-License-Identifier: AGPL-3.0 -import * as React from 'react'; +import React from 'react'; import { connect } from 'react-redux'; -import { RootState } from '~/store/store'; -import { AuthState } from '~/store/auth/auth-reducer'; -import { User } from "~/models/user"; -import { getSaltedToken } from '~/store/auth/auth-action-session'; -import { Config } from '~/common/config'; +import { RootState } from 'store/store'; +import { User } from "models/user"; +import { getSaltedToken } from 'store/auth/auth-action-session'; +import { Config } from 'common/config'; export interface FedLoginProps { user?: User; @@ -31,18 +30,19 @@ export const FedLogin = connect(mapStateToProps)( if (!apiToken || !user || !user.uuid.startsWith(localCluster)) { return <>; } - const [, tokenUuid, token] = apiToken.split("/"); return
{Object.keys(remoteHostsConfig) .map((k) => { if (k === localCluster) { - return; + return null; } if (!remoteHostsConfig[k].workbench2Url) { console.log(`Cluster ${k} does not define workbench2Url. Federated login / cross-site linking to ${k} is unavailable. Tell the admin of ${k} to set Services->Workbench2->ExternalURL in config.yml.`); - return; + return null; } - return