diff --git a/apps/core/src/bootstrap/plugins/setup.ts b/apps/core/src/bootstrap/plugins/setup.ts index 61b55ac1a2..cd4a176976 100644 --- a/apps/core/src/bootstrap/plugins/setup.ts +++ b/apps/core/src/bootstrap/plugins/setup.ts @@ -106,11 +106,6 @@ const deleteLayoutAtom = atom(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>(); const rootImportsMapSetupPromise = setupImportsMap(_rootImportsMap, { diff --git a/apps/core/src/components/workspace-header.tsx b/apps/core/src/components/workspace-header.tsx index f758ef4736..58501b25a2 100644 --- a/apps/core/src/components/workspace-header.tsx +++ b/apps/core/src/components/workspace-header.tsx @@ -100,7 +100,6 @@ export function WorkspaceHeader({ /> } center={} - right={} /> {} diff --git a/apps/core/src/pages/workspace/detail-page.tsx b/apps/core/src/pages/workspace/detail-page.tsx index c1c7fbf229..9b9b39d338 100644 --- a/apps/core/src/pages/workspace/detail-page.tsx +++ b/apps/core/src/pages/workspace/detail-page.tsx @@ -8,6 +8,7 @@ import type { EditorContainer } from '@blocksuite/editor'; import { assertExists } from '@blocksuite/global/utils'; import type { Page } from '@blocksuite/store'; import { + contentLayoutAtom, currentPageIdAtom, currentWorkspaceAtom, currentWorkspaceIdAtom, @@ -86,6 +87,7 @@ export const DetailPage = (): ReactElement => { }; export const loader: LoaderFunction = async args => { + rootStore.set(contentLayoutAtom, 'editor'); if (args.params.workspaceId) { localStorage.setItem('last_workspace_id', args.params.workspaceId); rootStore.set(currentWorkspaceIdAtom, args.params.workspaceId);