白石誠 5 лет назад
Родитель
Сommit
97ac238589
1 измененных файлов с 16 добавлено и 15 удалено
  1. 16 15
      src/client/js/components/PageDuplicateModal.jsx

+ 16 - 15
src/client/js/components/PageDuplicateModal.jsx

@@ -1,4 +1,4 @@
-import React, { useState, useEffect, useCallback } from 'react';
+import React, { useState } from 'react';
 import PropTypes from 'prop-types';
 import PropTypes from 'prop-types';
 
 
 import {
 import {
@@ -25,11 +25,25 @@ const PageDuplicateModal = (props) => {
 
 
   const [errs, setErrs] = useState(null);
   const [errs, setErrs] = useState(null);
 
 
-  const [getSubordinatedError, setGetSuborinatedError] = useState(null);
+  const [getSubordinatedError] = useState(null);
   const [isDuplicateRecursively, setIsDuplicateRecursively] = useState(true);
   const [isDuplicateRecursively, setIsDuplicateRecursively] = useState(true);
   const [isDuplicateRecursivelyWithoutExistPath, setIsDuplicateRecursivelyWithoutExistPath] = useState(true);
   const [isDuplicateRecursivelyWithoutExistPath, setIsDuplicateRecursivelyWithoutExistPath] = useState(true);
   const [isDuplicateExist, setIsDuplicateExist] = useState([]);
   const [isDuplicateExist, setIsDuplicateExist] = useState([]);
 
 
+
+  function createSubordinatedList(value) {
+
+    // ToDo: get the duplicated list from sever
+    // below is psuedo code
+    // let duplicatedList = get.apiv3......
+    // duplicatedList = duplicatedList.map((value) =>
+    // <li className="duplicate-exist" key={value}> {value}: { t('modal_duplicate.label.Same page already exists') } </li>; )
+    // setIsDuplicateExist(duplicatedList);
+
+    // for now we use dummy path
+    setIsDuplicateExist(['/test146/test147', value]);
+  }
+
   /**
   /**
    * change pageNameInput for PagePathAutoComplete
    * change pageNameInput for PagePathAutoComplete
    * @param {string} value
    * @param {string} value
@@ -59,19 +73,6 @@ const PageDuplicateModal = (props) => {
   //     setIsExist(true);
   //     setIsExist(true);
   //   }
   //   }
 
 
-  function createSubordinatedList(value) {
-
-    // ToDo: get the duplicated list from sever
-    // below is psuedo code
-    // let duplicatedList = get.apiv3......
-    // duplicatedList = duplicatedList.map((value) =>
-    // <li className="duplicate-exist" key={value}> {value}: { t('modal_duplicate.label.Same page already exists') } </li>; )
-    // setIsDuplicateExist(duplicatedList);
-
-    // for now we use dummy path
-    setIsDuplicateExist(['/test146/test147', value]);
-  }
-
 
 
   async function duplicate() {
   async function duplicate() {
     setErrs(null);
     setErrs(null);