X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ac687c484aeb0d16d4d2765cad4d64b171398b1e..72ee613468c6dee53b98ed1469ce9781a942dbe9:/src/views-components/main-app-bar/account-menu.tsx?ds=sidebyside

diff --git a/src/views-components/main-app-bar/account-menu.tsx b/src/views-components/main-app-bar/account-menu.tsx
index 87bfe0c6db..346a9ef02e 100644
--- a/src/views-components/main-app-bar/account-menu.tsx
+++ b/src/views-components/main-app-bar/account-menu.tsx
@@ -7,7 +7,6 @@ import { MenuItem, Divider } from "@material-ui/core";
 import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
 import { User, getUserFullname } from "~/models/user";
 import { DropdownMenu } from "~/components/dropdown-menu/dropdown-menu";
-import { Link } from "react-router-dom";
 import { UserPanelIcon } from "~/components/icon/icon";
 import { DispatchProp, connect } from 'react-redux';
 import { logout } from '~/store/auth/auth-action';
@@ -17,7 +16,8 @@ import { openRepositoriesPanel } from "~/store/repositories/repositories-actions
 import {
     navigateToSiteManager,
     navigateToSshKeysUser,
-    navigateToMyAccount
+    navigateToMyAccount,
+    navigateToLinkAccount
 } from '~/store/navigation/navigation-action';
 import { openUserVirtualMachines } from "~/store/virtual-machines/virtual-machines-actions";
 
@@ -32,7 +32,7 @@ interface AccountMenuProps {
 const mapStateToProps = (state: RootState): AccountMenuProps => ({
     user: state.auth.user,
     currentRoute: state.router.location ? state.router.location.pathname : '',
-    workbenchURL: state.config.workbenchUrl,
+    workbenchURL: state.auth.config.workbenchUrl,
     apiToken: state.auth.apiToken,
     localCluster: state.auth.localCluster
 });
@@ -75,12 +75,13 @@ export const AccountMenu = withStyles(styles)(
                         <MenuItem onClick={() => dispatch(navigateToSshKeysUser)}>Ssh Keys</MenuItem>
                         <MenuItem onClick={() => dispatch(navigateToSiteManager)}>Site Manager</MenuItem>
                         <MenuItem onClick={() => dispatch(navigateToMyAccount)}>My account</MenuItem>
+                        <MenuItem onClick={() => dispatch(navigateToLinkAccount)}>Link account</MenuItem>
                     </> : null}
                     <MenuItem>
                         <a href={`${workbenchURL.replace(/\/$/, "")}/${wb1URL(currentRoute)}?api_token=${apiToken}`}
                             className={classes.link}>
                             Switch to Workbench v1</a></MenuItem>
                     <Divider />
-                    <MenuItem onClick={() => dispatch(logout())}>Logout</MenuItem>
+                    <MenuItem onClick={() => dispatch(logout(true))}>Logout</MenuItem>
                 </DropdownMenu>
                 : null));
