kopia lustrzana https://github.com/Tldraw/Tldraw
18 wiersze
341 B
TypeScript
18 wiersze
341 B
TypeScript
import type { Data, TLDrawCommand } from '~types'
|
|
|
|
export function changePage(data: Data, pageId: string): TLDrawCommand {
|
|
return {
|
|
id: 'change_page',
|
|
before: {
|
|
appState: {
|
|
currentPageId: data.appState.currentPageId,
|
|
},
|
|
},
|
|
after: {
|
|
appState: {
|
|
currentPageId: pageId,
|
|
},
|
|
},
|
|
}
|
|
}
|