Bläddra i källkod

apply changes

Shun Miyazawa 4 år sedan
förälder
incheckning
9e5735d49a
1 ändrade filer med 1 tillägg och 10 borttagningar
  1. 1 10
      packages/app/src/components/Sidebar/PageTree/Item.tsx

+ 1 - 10
packages/app/src/components/Sidebar/PageTree/Item.tsx

@@ -160,11 +160,7 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
   // }, []);
   // }, []);
 
 
   // const onPressEnterForRenameHandler = async(inputText: string) => {
   // const onPressEnterForRenameHandler = async(inputText: string) => {
-  //   if (inputText == null || inputText === '' || inputText.trim() === '' || inputText.includes('/')) {
-  //     return;
-  //   }
-
-  //   const parentPath = getParentPagePath(page.path)
+  //   const parentPath = getParentPagePath(page.path as string)
   //   const newPagePath = `${parentPath}/${inputText}`;
   //   const newPagePath = `${parentPath}/${inputText}`;
 
 
   //   try {
   //   try {
@@ -226,11 +222,6 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
 
 
   const onPressEnterForCreateHandler = (inputText: string) => {
   const onPressEnterForCreateHandler = (inputText: string) => {
     setNewPageInputShown(false);
     setNewPageInputShown(false);
-
-    if (inputText == null || inputText === '' || inputText.trim() === '' || inputText.includes('/')) {
-      return;
-    }
-
     const parentPath = getParentPagePath(page.path as string);
     const parentPath = getParentPagePath(page.path as string);
     redirectToEditor(parentPath, inputText);
     redirectToEditor(parentPath, inputText);
   };
   };