Shun Miyazawa 4 lat temu
rodzic
commit
9e5735d49a

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