diff --git a/src/renderer/components/+add-cluster/add-cluster.tsx b/src/renderer/components/+add-cluster/add-cluster.tsx index 16914cd3a3..b9392e2b95 100644 --- a/src/renderer/components/+add-cluster/add-cluster.tsx +++ b/src/renderer/components/+add-cluster/add-cluster.tsx @@ -15,7 +15,6 @@ import { ClusterModel, ClusterStore, clusterStore } from "../../../common/cluste import { v4 as uuid } from "uuid"; import { navigate } from "../../navigation"; import { userStore } from "../../../common/user-store"; -import { clusterViewURL } from "../cluster-manager/cluster-view.route"; import { cssNames } from "../../utils"; import { Notifications } from "../notifications"; import { Tab, Tabs } from "../tabs"; @@ -23,6 +22,7 @@ import { ExecValidationNotFoundError } from "../../../common/custom-errors"; import { appEventBus } from "../../../common/event-bus"; import { PageLayout } from "../layout/page-layout"; import { docsUrl } from "../../../common/vars"; +import { catalogURL } from "../+catalog"; enum KubeConfigSourceTab { FILE = "file", @@ -181,18 +181,11 @@ export class AddCluster extends React.Component { runInAction(() => { clusterStore.addClusters(...newClusters); - if (newClusters.length === 1) { - const clusterId = newClusters[0].id; + Notifications.ok( + <>Successfully imported {newClusters.length} cluster(s) + ); - clusterStore.setActive(clusterId); - navigate(clusterViewURL({ params: { clusterId } })); - } else { - if (newClusters.length > 1) { - Notifications.ok( - <>Successfully imported {newClusters.length} cluster(s) - ); - } - } + navigate(catalogURL()); }); this.refreshContexts(); } catch (err) {