zahmis пре 4 година
родитељ
комит
d5f191eef6

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

@@ -10,7 +10,7 @@ import CustomBotWithoutProxyIntegrationCard from './CustomBotWithoutProxyIntegra
 import DeleteSlackCredentialsModal from './DeleteSlackCredentialsModal';
 
 const CustomBotWithoutProxySettings = (props) => {
-  const { appContainer, isSlackScopeSet } = props;
+  const { appContainer, /* isSlackScopeSet, */ isSetupSlackBot } = props;
   const { t } = useTranslation();
 
   const [siteName, setSiteName] = useState('');
@@ -23,6 +23,7 @@ const CustomBotWithoutProxySettings = (props) => {
         slackBotToken: '',
         currentBotType: 'customBotWithoutProxy',
       });
+      props.onSetIsSetupSlackBot(false);
       props.fetchSlackIntegrationData();
       toastSuccess('success');
     }
@@ -48,7 +49,7 @@ const CustomBotWithoutProxySettings = (props) => {
 
       <h2 className="admin-setting-header">{t('admin:slack_integration.custom_bot_without_proxy_settings')}</h2>
 
-      {isSlackScopeSet && (
+      {isSetupSlackBot && (
       <button
         className="pull-right btn text-danger border-danger"
         type="button"
@@ -83,7 +84,9 @@ CustomBotWithoutProxySettings.propTypes = {
   isRgisterSlackCredentials: PropTypes.bool,
   isConnectedToSlack: PropTypes.bool,
   isSlackScopeSet: PropTypes.bool,
+  isSetupSlackBot: PropTypes.bool,
   slackWSNameInWithoutProxy: PropTypes.string,
+  onSetIsSetupSlackBot: PropTypes.func,
   fetchSlackIntegrationData: PropTypes.func,
 };