소스 검색

Removed unnecessary const assignment

Steven Fukase 5 년 전
부모
커밋
88bb52805c
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      src/client/js/components/Admin/SlackIntegration/CustomBotWithoutProxySettingsAccordion.jsx

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

@@ -7,8 +7,7 @@ const CustomBotWithoutSettingsAccordion = () => {
   const [currentlyOpenAccordionIndexes, setCurrentlyOpenAccordionIndexes] = useState([]);
   const onToggleAccordionHandler = (i) => {
     if (currentlyOpenAccordionIndexes.includes(i)) {
-      const filteredArray = currentlyOpenAccordionIndexes.filter(n => n !== i);
-      setCurrentlyOpenAccordionIndexes(filteredArray);
+      setCurrentlyOpenAccordionIndexes(currentlyOpenAccordionIndexes.filter(n => n !== i));
       return;
     }
     setCurrentlyOpenAccordionIndexes([...currentlyOpenAccordionIndexes, i]);