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

+ 6 - 6
src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx

@@ -78,10 +78,10 @@ const SlackIntegration = (props) => {
     fetchSlackIntegrationData();
     fetchSlackIntegrationData();
   }, [fetchSlackIntegrationData]);
   }, [fetchSlackIntegrationData]);
 
 
-  const changeCurrentBotSettings = async(clickedBotType) => {
+  const changeCurrentBotSettings = async(botType) => {
     try {
     try {
       const res = await appContainer.apiv3.put('/slack-integration-settings/bot-type', {
       const res = await appContainer.apiv3.put('/slack-integration-settings/bot-type', {
-        currentBotType: selectedBotType || clickedBotType,
+        currentBotType: selectedBotType || botType,
       });
       });
       setCurrentBotType(res.data.slackBotTypeParam.slackBotType);
       setCurrentBotType(res.data.slackBotTypeParam.slackBotType);
       setSelectedBotType(null);
       setSelectedBotType(null);
@@ -96,14 +96,14 @@ const SlackIntegration = (props) => {
     }
     }
   };
   };
 
 
-  const botTypeSelectHandler = async(clickedBotType) => {
-    if (clickedBotType === currentBotType) {
+  const botTypeSelectHandler = async(botType) => {
+    if (botType === currentBotType) {
       return;
       return;
     }
     }
     if (currentBotType == null) {
     if (currentBotType == null) {
-      return changeCurrentBotSettings(clickedBotType);
+      return changeCurrentBotSettings(botType);
     }
     }
-    setSelectedBotType(clickedBotType);
+    setSelectedBotType(botType);
   };
   };
 
 
   const changeCurrentBotSettingsHandler = async() => {
   const changeCurrentBotSettingsHandler = async() => {