mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 10:36:22 +08:00
chore: optimized style (#4098)
This commit is contained in:
@@ -102,6 +102,9 @@ const BlockSuiteEditorImpl = (props: EditorProps): ReactElement => {
|
||||
}, [editor]);
|
||||
|
||||
useEffect(() => {
|
||||
if (page.meta.trash) {
|
||||
return;
|
||||
}
|
||||
editor
|
||||
.createBlockHub()
|
||||
.then(blockHub => {
|
||||
@@ -122,7 +125,7 @@ const BlockSuiteEditorImpl = (props: EditorProps): ReactElement => {
|
||||
}
|
||||
blockHubRef.current?.remove();
|
||||
};
|
||||
}, [editor, page.awarenessStore, setBlockHub]);
|
||||
}, [editor, page.awarenessStore, page.meta.trash, setBlockHub]);
|
||||
|
||||
// issue: https://github.com/toeverything/AFFiNE/issues/2004
|
||||
const className = `editor-wrapper ${editor.mode}-mode ${
|
||||
|
||||
@@ -43,6 +43,7 @@ const ConfirmModal = ({
|
||||
content={t['will be moved to Trash']({
|
||||
title: title || 'Untitled',
|
||||
})}
|
||||
confirmButtonTestId="confirm-delete-page"
|
||||
confirmText={t.Delete()}
|
||||
confirmType="error"
|
||||
{...confirmModalProps}
|
||||
|
||||
Reference in New Issue
Block a user