sunguroku 4 лет назад
Родитель
Сommit
a4cac7aad7

+ 12 - 12
dashboard/src/components/repo-selector/RepoList.tsx

@@ -149,18 +149,18 @@ const RepoList: React.FC<Props> = ({
           </LoadingWrapper>
         );
       }
-      
-      // if (accessData.accounts?.length === 0) {
-      return (
-        <LoadingWrapper>
-          No connected Github repos found. You can
-          <A href={"/api/integrations/github-app/install"}>
-            Install Porter in more repositories
-          </A>
-          .
-        </LoadingWrapper>
-      );
-      // }
+
+      if (accessData.accounts?.length === 0) {
+        return (
+          <LoadingWrapper>
+            No connected Github repos found. You can
+            <A href={"/api/integrations/github-app/install"}>
+              Install Porter in more repositories
+            </A>
+            .
+          </LoadingWrapper>
+        );
+      }
     }
 
     // show 10 most recently used repos if user hasn't searched anything yet

+ 1 - 1
dashboard/src/main/home/modals/AccountSettingsModal.tsx

@@ -79,7 +79,7 @@ const AccountSettingsModal = () => {
           )}
 
           {/* Will be styled (and show what account is connected) later */}
-          {!accessError && accessData.accounts?.length >= 0 && (
+          {!accessError && accessData.username && (
             <Placeholder>
               <User>
                 You are currently authorized as <B>{accessData.username}</B> and