fix: remove useEffect on router sync with atoms (#2241)

This commit is contained in:
Himself65
2023-05-12 05:37:42 +08:00
committed by GitHub
parent 063ffda09d
commit 8d117123d7
12 changed files with 206 additions and 192 deletions

View File

@@ -30,6 +30,7 @@ export const createAffineDownloadProvider = (
new Uint8Array(hashMap.get(id) as ArrayBuffer)
);
connected = true;
callbacks.forEach(cb => cb());
return;
}
affineApis
@@ -41,6 +42,8 @@ export const createAffineDownloadProvider = (
blockSuiteWorkspace.doc,
new Uint8Array(binary)
);
connected = true;
callbacks.forEach(cb => cb());
})
.catch(e => {
providerLogger.error('downloadWorkspace', e);