|
|
@@ -115,34 +115,6 @@ const SlackIntegration = (props) => {
|
|
|
setSelectedBotType(null);
|
|
|
};
|
|
|
|
|
|
- return (
|
|
|
- <>
|
|
|
- <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 (
|
|
|
- <div key={botType} className="m-3">
|
|
|
- <BotTypeCard
|
|
|
- botType={botType}
|
|
|
- isActive={currentBotType === botType}
|
|
|
- onBotTypeSelectHandler={botTypeSelectHandler}
|
|
|
- />
|
|
|
- </div>
|
|
|
- );
|
|
|
- })}
|
|
|
- </div>
|
|
|
- </>
|
|
|
- );
|
|
|
-
|
|
|
- };
|
|
|
let settingsComponent = null;
|
|
|
|
|
|
switch (currentBotType) {
|
|
|
@@ -187,6 +159,14 @@ const SlackIntegration = (props) => {
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
+ if (isLoading) {
|
|
|
+ return (
|
|
|
+ <div className="text-muted text-center">
|
|
|
+ <i className="fa fa-2x fa-spinner fa-pulse mr-1"></i>
|
|
|
+ </div>
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
return (
|
|
|
<>
|
|
|
<ConfirmBotChangeModal
|
|
|
@@ -212,24 +192,17 @@ const SlackIntegration = (props) => {
|
|
|
</a>
|
|
|
</h2>
|
|
|
|
|
|
- {isLoading ? (
|
|
|
- <div className="text-muted text-center">
|
|
|
- <i className="fa fa-2x fa-spinner fa-pulse mr-1"></i>
|
|
|
- </div>
|
|
|
- )
|
|
|
- : (
|
|
|
- <>
|
|
|
- <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="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) => {
|
|
|
+ <div className="row my-5 flex-wrap-reverse justify-content-center">
|
|
|
+ {botTypes.map((botType) => {
|
|
|
return (
|
|
|
<div key={botType} className="m-3">
|
|
|
<BotTypeCard
|
|
|
@@ -240,11 +213,7 @@ const SlackIntegration = (props) => {
|
|
|
</div>
|
|
|
);
|
|
|
})}
|
|
|
- </div>
|
|
|
- </>
|
|
|
-)}
|
|
|
-
|
|
|
-
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
{settingsComponent}
|