mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-01 01:29:31 +08:00
9 lines
294 B
TypeScript
9 lines
294 B
TypeScript
import type { Store } from '@blocksuite/store';
|
|
|
|
import type { SurfaceBlockModel } from '../surface-model';
|
|
|
|
export function getSurfaceBlock(doc: Store) {
|
|
const blocks = doc.getBlocksByFlavour('affine:surface');
|
|
return blocks.length !== 0 ? (blocks[0].model as SurfaceBlockModel) : null;
|
|
}
|