mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 21:41:52 +08:00
refactor(editor): merge docCreated and docAdded slot (#9489)
This commit is contained in:
@@ -16,7 +16,7 @@ export function useDocCollectionPage(
|
||||
useEffect(() => {
|
||||
const group = new DisposableGroup();
|
||||
group.add(
|
||||
docCollection.slots.docAdded.on(id => {
|
||||
docCollection.slots.docCreated.on(id => {
|
||||
if (pageId === id) {
|
||||
setPage(docCollection.getDoc(id));
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export function useDocCollectionPage(
|
||||
useEffect(() => {
|
||||
const group = new DisposableGroup();
|
||||
group.add(
|
||||
docCollection.slots.docAdded.on(id => {
|
||||
docCollection.slots.docCreated.on(id => {
|
||||
if (pageId === id) {
|
||||
setPage(docCollection.getDoc(id));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user