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 LongYinan
parent 5008958e84
commit ec66b229fe
12 changed files with 206 additions and 192 deletions
@@ -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);