zahmis il y a 4 ans
Parent
commit
a6ef298f72

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

@@ -9,17 +9,17 @@ import CustomBotWithoutProxyIntegrationCard from './CustomBotWithoutProxyIntegra
 import DeleteSlackBotSettingsModal from './DeleteSlackBotSettingsModal';
 
 const CustomBotWithoutProxySettings = (props) => {
-  const { appContainer, onResetWithoutProxySettings } = props;
+  const { appContainer, onResetSettings } = props;
   const { t } = useTranslation();
 
   const [siteName, setSiteName] = useState('');
   const [isDeleteConfirmModalShown, setIsDeleteConfirmModalShown] = useState(false);
 
   const resetSettings = async() => {
-    if (onResetWithoutProxySettings == null) {
+    if (onResetSettings == null) {
       return;
     }
-    onResetWithoutProxySettings();
+    onResetSettings();
   };
 
   useEffect(() => {
@@ -73,7 +73,7 @@ CustomBotWithoutProxySettings.propTypes = {
   slackBotTokenEnv: PropTypes.string,
   isRgisterSlackCredentials: PropTypes.bool,
   slackWSNameInWithoutProxy: PropTypes.string,
-  onResetWithoutProxySettings: PropTypes.func,
+  onResetSettings: PropTypes.func,
 };
 
 export default CustomBotWithoutProxySettingsWrapper;

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

@@ -49,7 +49,7 @@ const SlackIntegration = (props) => {
     }
   }, [appContainer.apiv3]);
 
-  const resetWithoutProxySettings = async() => {
+  const resetSettings = async() => {
     await appContainer.apiv3.put('/slack-integration-settings/bot-type', { currentBotType });
     fetchSlackIntegrationData();
     toastSuccess('success');
@@ -118,7 +118,7 @@ const SlackIntegration = (props) => {
           onSetSlackBotToken={setSlackBotToken}
           onSetIsSendTestMessage={setIsSendTestMessage}
           onSetCurrentBotType={setCurrentBotType}
-          onResetWithoutProxySettings={resetWithoutProxySettings}
+          onResetSettings={resetSettings}
         />
       );
       break;