소스 검색

Hotfix projects errors (#2855)

* install github app button

* general error component

* auto-generate cluster name

* fix button text color

* infra tab for porter user

* fixed.

* fixed.
jusrhee 3 년 전
부모
커밋
3909a41605
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      dashboard/src/main/CurrentError.tsx
  2. 4 2
      dashboard/src/main/home/sidebar/ProjectSection.tsx

+ 1 - 1
dashboard/src/main/CurrentError.tsx

@@ -133,7 +133,7 @@ const StyledCurrentError = styled.div`
   border-radius: 3px;
   background: #272731cc;
   border: 1px solid #ffffff55;
-  display: flex;
+  display: none;
   align-items: center;
   color: #ffffff;
 

+ 4 - 2
dashboard/src/main/home/sidebar/ProjectSection.tsx

@@ -45,7 +45,7 @@ class ProjectSection extends Component<PropsType, StateType> {
   };
 
   renderOptionList = () => {
-    let { setCurrentProject, setCurrentCluster } = this.context;
+    let { setCurrentProject, setCurrentCluster, currentProject } = this.context;
     return this.props.projects.map((project: ProjectType, i: number) => {
       return (
         <Option
@@ -53,7 +53,9 @@ class ProjectSection extends Component<PropsType, StateType> {
           selected={project.name === this.props.currentProject.name}
           onClick={() => {
             this.setState({ expanded: false });
-            setCurrentCluster(null);
+            if (project.id !== currentProject.id) {
+              setCurrentCluster(null);
+            }
             setCurrentProject(project, () => {
               pushFiltered(this.props, "/dashboard", ["project_id"]);
             });