From 13d4ba386b651fab4f424b8756a6fb6af2dfec64 Mon Sep 17 00:00:00 2001 From: yuye-aws Date: Thu, 6 Jul 2023 10:13:06 +0800 Subject: [PATCH] Reuse method getWorkspaceUrl Signed-off-by: yuye-aws --- .../public/chrome/ui/header/collapsible_nav.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/core/public/chrome/ui/header/collapsible_nav.tsx b/src/core/public/chrome/ui/header/collapsible_nav.tsx index 19952d65cd43..4c5db1a31d4a 100644 --- a/src/core/public/chrome/ui/header/collapsible_nav.tsx +++ b/src/core/public/chrome/ui/header/collapsible_nav.tsx @@ -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) { const allCategories = {} as Record; @@ -297,16 +296,8 @@ export function CollapsibleNav({ <> { - 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'}