Shun Miyazawa 4 年之前
父节点
当前提交
da889aacf7
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. 3 5
      packages/app/src/components/PageDeleteModal.tsx

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

@@ -60,10 +60,6 @@ const PageDeleteModal: FC<Props> = (props: Props) => {
     setIsDeleteCompletely(!isDeleteCompletely);
   }
 
-  function redicretToTrash(pagePath: string) {
-    window.location.href = encodeURI(pagePath);
-  }
-
   async function deletePage() {
     // toastr.warning(t('search_result.currently_not_implemented'));
     // Todo implement page delete function at https://redmine.weseek.co.jp/issues/82222
@@ -83,7 +79,9 @@ const PageDeleteModal: FC<Props> = (props: Props) => {
           completely,
         }) as IPageApiv1Result;
 
-        redicretToTrash(result.page.path);
+        const trashPagePath = result.page.path;
+
+        window.location.href = encodeURI(trashPagePath);
 
       }
       catch (err) {