zahmis 4 лет назад
Родитель
Сommit
bae1336364
1 измененных файлов с 18 добавлено и 12 удалено
  1. 18 12
      src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx

+ 18 - 12
src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx

@@ -157,6 +157,7 @@ const SlackIntegration = (props) => {
       break;
       break;
   }
   }
 
 
+  console.log(connectionStatuses);
   return (
   return (
     <>
     <>
       <ConfirmBotChangeModal
       <ConfirmBotChangeModal
@@ -182,17 +183,20 @@ const SlackIntegration = (props) => {
           </a>
           </a>
         </h2>
         </h2>
 
 
-        <div className="d-flex justify-content-end">
-          <button
-            className="btn btn-outline-danger"
-            type="button"
-            onClick={() => setIsDeleteConfirmModalShown(true)}
-          >{t('admin:slack_integration.reset_all_settings')}
-          </button>
-        </div>
-
-        <div className="row my-5 flex-wrap-reverse justify-content-center">
-          {botTypes.map((botType) => {
+        {Object.keys(connectionStatuses).length === 0 ? <h1>hoeg</h1>
+        : (
+          <>
+            <div className="d-flex justify-content-end">
+              <button
+                className="btn btn-outline-danger"
+                type="button"
+                onClick={() => setIsDeleteConfirmModalShown(true)}
+              >{t('admin:slack_integration.reset_all_settings')}
+              </button>
+            </div>
+
+            <div className="row my-5 flex-wrap-reverse justify-content-center">
+              {botTypes.map((botType) => {
             return (
             return (
               <div key={botType} className="m-3">
               <div key={botType} className="m-3">
                 <BotTypeCard
                 <BotTypeCard
@@ -203,7 +207,9 @@ const SlackIntegration = (props) => {
               </div>
               </div>
             );
             );
           })}
           })}
-        </div>
+            </div>
+          </>
+        )}
       </div>
       </div>
 
 
       {settingsComponent}
       {settingsComponent}