feat: new preload pages (#3674)

This commit is contained in:
Alex Yang
2023-08-10 15:56:16 -04:00
committed by GitHub
parent f06efd4d02
commit 43b35a77bb
43 changed files with 14197 additions and 6833 deletions

View File

@@ -1,12 +1,8 @@
import type { Page } from '@blocksuite/store';
export async function initPageWithPreloading(page: Page) {
const workspace = page.workspace;
const { data } = await import('@affine/templates/preloading.json');
await page.waitForLoaded();
await workspace.importPageSnapshot(data['space:hello-world'], page.id);
}
/**
* @deprecated
*/
export async function initEmptyPage(page: Page) {
await page.waitForLoaded();
const pageBlockId = page.addBlock('affine:page', {