Skip to content

Commit

Permalink
Reuse method getWorkspaceUrl
Browse files Browse the repository at this point in the history
Signed-off-by: yuye-aws <yuyezhu@amazon.com>
  • Loading branch information
yuye-aws committed Jul 6, 2023
1 parent 53eeb33 commit 13d4ba3
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/core/public/chrome/ui/header/collapsible_nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ import { OnIsLockedUpdate } from './';
import { createEuiListItem, isModifiedOrPrevented, createWorkspaceNavLink } from './nav_link';
import { ChromeBranding } from '../../chrome_service';
import { WorkspaceAttribute } from '../../../workspace';
import { PATHS, WORKSPACE_APP_ID, WORKSPACE_ID_IN_SESSION_STORAGE } from '../../constants';

function getAllCategories(allCategorizedLinks: Record<string, ChromeNavLink[]>) {
const allCategories = {} as Record<string, AppCategory | undefined>;
Expand Down Expand Up @@ -297,16 +296,8 @@ export function CollapsibleNav({
<>
<EuiCollapsibleNavGroup iconType={'folderClosed'} title={currentWorkspace.name} />
<EuiCollapsibleNavGroup
onClick={async () => {
closeNav();
await navigateToApp(WORKSPACE_APP_ID, {
path:
PATHS.update +
'?' +
WORKSPACE_ID_IN_SESSION_STORAGE +
'=' +
currentWorkspace.id,
});
onClick={() => {
window.location.href = getWorkspaceUrl(currentWorkspace.id);
}}
iconType={'grid'}
title={'Overview'}
Expand Down

0 comments on commit 13d4ba3

Please sign in to comment.