refactor(web): move current atoms into plugin infra (#3220)

This commit is contained in:
Alex Yang
2023-07-13 20:14:30 +08:00
parent 912cd7fb8b
commit 22aa7ff25f
13 changed files with 91 additions and 98 deletions

View File

@@ -12,6 +12,8 @@ export const rootStore = createStore();
// todo: for now every plugin is enabled by default
export const affinePluginsAtom = atom<Record<string, AffinePlugin<string>>>({});
export const currentPageIdAtom = atom<string | null>(null);
export const currentWorkspaceIdAtom = atom<string | null>(null);
export function definePlugin<ID extends string>(
definition: Definition<ID>,