mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
refactor(core): refactor atom to use di (#5831)
To support multiple instances, this PR removes some atoms and implements them using the new DI system. removed atom - `pageSettingsAtom` - `currentPageIdAtom` - `currentModeAtom`
This commit is contained in:
@@ -37,7 +37,7 @@ export async function configureTestingEnvironment() {
|
||||
|
||||
await workspace.engine.sync.waitForSynced();
|
||||
|
||||
const { page } = workspace.services.get(PageManager).openByPageId('page0');
|
||||
const { page } = workspace.services.get(PageManager).open('page0');
|
||||
|
||||
rootServices.get(CurrentWorkspaceService).openWorkspace(workspace);
|
||||
workspace.services.get(CurrentPageService).openPage(page);
|
||||
|
||||
Reference in New Issue
Block a user