Просмотр исходного кода

Deleted comments, changed variable name

Steven Fukase 5 лет назад
Родитель
Сommit
dc95d48c9f
1 измененных файлов с 2 добавлено и 6 удалено
  1. 2 6
      src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx

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

@@ -9,7 +9,6 @@ import ConfirmBotChangeModal from './ConfirmBotChangeModal';
 const SlackIntegration = () => {
 const SlackIntegration = () => {
   const [currentBotType, setCurrentBotType] = useState(null);
   const [currentBotType, setCurrentBotType] = useState(null);
   const [selectedBotType, setSelectedBotType] = useState(null);
   const [selectedBotType, setSelectedBotType] = useState(null);
-  // const [isConfirmBotChangeModalOpen, setIsConfirmBotChangeModalOpen] = useState(false);
 
 
   const handleBotTypeSelect = (clickedBotType) => {
   const handleBotTypeSelect = (clickedBotType) => {
     if (clickedBotType === currentBotType) {
     if (clickedBotType === currentBotType) {
@@ -20,18 +19,15 @@ const SlackIntegration = () => {
       return;
       return;
     }
     }
     setSelectedBotType(clickedBotType);
     setSelectedBotType(clickedBotType);
-    // setIsConfirmBotChangeModalOpen(true);
   };
   };
 
 
-  const handleBotChangeCancel = () => {
+  const handleCancelBotChange = () => {
     setSelectedBotType(null);
     setSelectedBotType(null);
-    // setIsConfirmBotChangeModalOpen(false);
   };
   };
 
 
   const changeCurrentBotSettings = () => {
   const changeCurrentBotSettings = () => {
     setCurrentBotType(selectedBotType);
     setCurrentBotType(selectedBotType);
     setSelectedBotType(null);
     setSelectedBotType(null);
-    // setIsConfirmBotChangeModalOpen(false);
   };
   };
 
 
   let settingsComponent = null;
   let settingsComponent = null;
@@ -54,7 +50,7 @@ const SlackIntegration = () => {
         <ConfirmBotChangeModal
         <ConfirmBotChangeModal
           isOpen={selectedBotType != null}
           isOpen={selectedBotType != null}
           onConfirmClick={changeCurrentBotSettings}
           onConfirmClick={changeCurrentBotSettings}
-          onCancelClick={handleBotChangeCancel}
+          onCancelClick={handleCancelBotChange}
         />
         />
       </div>
       </div>