Skip to content

Commit

Permalink
feat: optimize the jump logic
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe committed Apr 11, 2024
1 parent b38ed60 commit c20b2d8
Showing 1 changed file with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,7 @@ export const WorkspaceMenu = ({ coreStart }: Props) => {
}),
key: WORKSPACE_CREATE_APP_ID,
onClick: () => {
window.location.assign(
cleanWorkspaceId(
coreStart.application.getUrlForApp(WORKSPACE_CREATE_APP_ID, {
absolute: false,
})
)
);
coreStart.application.navigateToApp(WORKSPACE_CREATE_APP_ID);
},
});
workspaceListItems.push({
Expand All @@ -117,13 +111,7 @@ export const WorkspaceMenu = ({ coreStart }: Props) => {
}),
key: WORKSPACE_LIST_APP_ID,
onClick: () => {
window.location.assign(
cleanWorkspaceId(
coreStart.application.getUrlForApp(WORKSPACE_LIST_APP_ID, {
absolute: false,
})
)
);
coreStart.application.navigateToApp(WORKSPACE_LIST_APP_ID);
},
});
return workspaceListItems;
Expand Down

0 comments on commit c20b2d8

Please sign in to comment.