feat: improve document remove & title (#657)

* fix: cancel delete, do not show toast
* feat: support document title sync page title
This commit is contained in:
Chi Zhang authored and GitHub committed 2023-01-03 13:39:24 +08:00
1 parent c840251886
commit 8e1bf90ebd
2 files changed
+2 -1

No files matched your search

@@ -87,7 +87,7 @@ const PopoverContent = () => {
confirmType: 'danger',
}).then(confirm => {
confirm && toggleDeletePage(id);
toast('Moved to Trash');
confirm && toast('Moved to Trash');
});
}}
icon={<TrashIcon />}
@@ -68,6 +68,7 @@ const Page: NextPageWithLayout = () => {
}
}
document.title = currentPage?.meta.title || 'Untitled';
return ret;
}, [currentWorkspace, currentPage, createEditor, setEditor]);