fix: infinite spinner with no-clusters view

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-28 11:42:57 +03:00
1 parent be52b4ad93
commit 4087cf025e
5 files changed
+15 -6

No files matched your search

@@ -9,7 +9,7 @@ import { cssNames, IClassName } from "../../utils";
import { Terminal } from "../dock/terminal";
import { i18nStore } from "../../i18n";
import { themeStore } from "../../theme.store";
import { clusterStore, getHostedClusterId } from "../../../common/cluster-store";
import { clusterStore, getHostedClusterId, isNoClustersView } from "../../../common/cluster-store";
import { CubeSpinner } from "../spinner";
interface Props {
@@ -30,7 +30,8 @@ export class ClusterManager extends React.Component<Props> {
@computed get isInactive() {
const { activeCluster, activeClusterId } = clusterStore;
const isActivatedBefore = activeCluster?.initialized;
return !isActivatedBefore && activeClusterId !== getHostedClusterId();
if (isNoClustersView() || isActivatedBefore) return;
return activeClusterId !== getHostedClusterId();
}
render() {