Просмотр исходного кода

enable show reset button when current bot type is official or withProxy

Shun Miyazawa 4 лет назад
Родитель
Сommit
3f16fa8a2f

+ 7 - 5
src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx

@@ -124,11 +124,13 @@ const SlackIntegration = (props) => {
         onCancelClick={cancelBotChangeHandler}
       />
 
-      <button
-        className="mx-3 pull-right btn text-danger border-danger"
-        type="button"
-      >{t('admin:slack_integration.reset_all_settings')}
-      </button>
+      {(currentBotType === 'officialBot' || currentBotType === 'customBotWithProxy') && (
+        <button
+          className="mx-3 pull-right btn text-danger border-danger"
+          type="button"
+        >{t('admin:slack_integration.reset_all_settings')}
+        </button>
+      )}
 
       <div className="selecting-bot-type mb-5">
         <h2 className="admin-setting-header mb-4">