refactor: remove sync storage (#2269)

This commit is contained in:
Himself65
2023-05-09 06:21:42 +08:00
committed by GitHub
parent 3a6be4510b
commit 95bc5cac49
9 changed files with 22 additions and 102 deletions

View File

@@ -1,4 +1,3 @@
import { atomWithSyncStorage } from '@affine/jotai';
import type { EditorContainer } from '@blocksuite/editor';
import { atom, createStore } from 'jotai';
import { atomWithStorage, createJSONStorage } from 'jotai/utils';
@@ -19,7 +18,7 @@ export type RootWorkspaceMetadata = {
* this atom stores the metadata of all workspaces,
* which is `id` and `flavor`, that is enough to load the real workspace data
*/
export const rootWorkspacesMetadataAtom = atomWithSyncStorage<
export const rootWorkspacesMetadataAtom = atomWithStorage<
RootWorkspaceMetadata[]
>(
// don't change this key,