mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 17:16:16 +08:00
19 lines
496 B
TypeScript
19 lines
496 B
TypeScript
import type { TldrawCommand } from '@toeverything/components/board-types';
|
|
import type { TldrawApp } from '@toeverything/components/board-state';
|
|
|
|
export function changePage(app: TldrawApp, pageId: string): TldrawCommand {
|
|
return {
|
|
id: 'change_page',
|
|
before: {
|
|
appState: {
|
|
currentPageId: app.currentPageId,
|
|
},
|
|
},
|
|
after: {
|
|
appState: {
|
|
currentPageId: pageId,
|
|
},
|
|
},
|
|
};
|
|
}
|