浏览代码

Undo bad comment

Jo Chuang 5 年之前
父节点
当前提交
aa73b61d13
共有 1 个文件被更改,包括 10 次插入12 次删除
  1. 10 12
      dashboard/src/main/home/Home.tsx

+ 10 - 12
dashboard/src/main/home/Home.tsx

@@ -72,18 +72,16 @@ class Home extends Component<PropsType, StateType> {
         return;
         return;
       }
       }
 
 
-      // if (res.data.length > 0 && (!currentCluster && !includesCompletedInfraSet(res.data))) {
-      //   // force refresh if currentView is identical set to provisioner. Tentative solution before refactoring.
-      //   this.setState({ currentView: 'dashboard'}, () => {
-      //     this.setState({ currentView: 'provisioner', sidebarReady: true, });
-      //   });
-      // } else if (this.state.ghRedirect) {
-      //   this.setState({ currentView: 'integrations', sidebarReady: true, ghRedirect: false });
-      // } else {
-      //   this.setState({ currentView: 'provisioner'}, () => {
-      //     this.setState({ currentView: 'dashboard', sidebarReady: true });
-      //   })
-      // }
+      if (res.data.length > 0 && (!currentCluster && !includesCompletedInfraSet(res.data))) {
+        this.props.history.push("provisioner");
+        this.setState({ sidebarReady: true });
+      } else if (this.state.ghRedirect) {
+        this.props.history.push("integrations");
+        this.setState({ sidebarReady: true, ghRedirect: false });
+      } else {
+        this.props.history.push("dashboard");
+        this.setState({ sidebarReady: true });
+      }
     });
     });
   }
   }