Shun Miyazawa пре 4 година
родитељ
комит
6b1637827a
1 измењених фајлова са 3 додато и 7 уклоњено
  1. 3 7
      packages/app/src/components/PageDeleteModal.tsx

+ 3 - 7
packages/app/src/components/PageDeleteModal.tsx

@@ -61,11 +61,7 @@ const PageDeleteModal: FC<Props> = (props: Props) => {
   }
 
   function redicretToTrash(pagePath: string) {
-    const dirname = nodePath.dirname(pagePath as string);
-    if (dirname === '/trash') {
-      window.location.href = encodeURI(pagePath);
-    }
-    return;
+    window.location.href = encodeURI(pagePath);
   }
 
   async function deletePage() {
@@ -77,8 +73,8 @@ const PageDeleteModal: FC<Props> = (props: Props) => {
       try {
         // control flag
         // If is it not true, Request value must be `null`.
-        const recursively = isDeleteRecursively !== true ? true : null;
-        const completely = isDeleteCompletely !== true ? true : null;
+        const recursively = isDeleteRecursively === true ? true : undefined;
+        const completely = isDeleteCompletely === true ? true : undefined;
 
         // TODO: Create an endpoint (pages.removeMany)
         const result = await apiPost('/pages.removeMany', {