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

+ 3 - 3
src/client/js/components/Admin/SlackIntegration/WithProxyAccordions.jsx

@@ -185,7 +185,6 @@ const TestProcess = ({
   const { t } = useTranslation();
   const { t } = useTranslation();
   const [testChannel, setTestChannel] = useState('');
   const [testChannel, setTestChannel] = useState('');
   const [logsValue, setLogsValue] = useState('');
   const [logsValue, setLogsValue] = useState('');
-
   const successMessage = 'Successfully sent to Slack workspace.';
   const successMessage = 'Successfully sent to Slack workspace.';
 
 
   const submitForm = async(e) => {
   const submitForm = async(e) => {
@@ -256,12 +255,13 @@ const TestProcess = ({
 
 
 const WithProxyAccordions = (props) => {
 const WithProxyAccordions = (props) => {
   const { t } = useTranslation();
   const { t } = useTranslation();
-  // const { connectionStatuses } = props;
   const [isLatestConnectionSuccess, setIsLatestConnectionSuccess] = useState(false);
   const [isLatestConnectionSuccess, setIsLatestConnectionSuccess] = useState(false);
 
 
   const submitForm = () => {
   const submitForm = () => {
-    props.onSubmitForm();
     setIsLatestConnectionSuccess(true);
     setIsLatestConnectionSuccess(true);
+    if (props.onSubmitForm != null) {
+      props.onSubmitForm();
+    }
   };
   };
 
 
   const submitFormFailed = () => {
   const submitFormFailed = () => {