feat: block-hub in edgeless mode (#1634)

This commit is contained in:
Fangdun Tsai 2023-03-22 11:41:54 +08:00 committed by GitHub
parent 64dac7cc1c
commit 215db27cd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

1
.github/CLA.md vendored
View File

@ -51,3 +51,4 @@ Example:
- Alessio Gravili, @AlessioGr, 2023/03/04 - Alessio Gravili, @AlessioGr, 2023/03/04
- Victor Nanka, @victornanka, 2023/03/09 - Victor Nanka, @victornanka, 2023/03/09
- Aditya Sharma, @adityash1, 2023/03/21 - Aditya Sharma, @adityash1, 2023/03/21
- Fangdun Tsai, @fundon, 2023/03/21

View File

@ -58,10 +58,7 @@ export const BlockSuiteEditor = (props: EditorProps) => {
if (!editor || !container || !page) { if (!editor || !container || !page) {
return; return;
} }
if ( if (page.awarenessStore.getFlag('enable_block_hub')) {
page.awarenessStore.getFlag('enable_block_hub') &&
props.mode === 'page'
) {
editor.createBlockHub().then(blockHub => { editor.createBlockHub().then(blockHub => {
if (blockHubRef.current) { if (blockHubRef.current) {
blockHubRef.current.remove(); blockHubRef.current.remove();