fix(core): cleanup layout when switch page (#3794)

This commit is contained in:
Alex Yang
2023-08-16 23:34:56 -05:00
committed by GitHub
parent c3e465d644
commit da3dd1e324
5 changed files with 79 additions and 54 deletions
+5
View File
@@ -106,6 +106,11 @@ const deleteLayoutAtom = atom<null, [string], void>(null, (_, set, id) => {
});
});
// clean up plugin windows when switching to other pages
rootStore.sub(currentPageAtom, () => {
rootStore.set(contentLayoutAtom, 'editor');
});
// module -> importName -> updater[]
export const _rootImportsMap = new Map<string, Map<string, any>>();
const rootImportsMapSetupPromise = setupImportsMap(_rootImportsMap, {