mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
refactor(editor): remove global types in model (#10082)
Closes: [BS-2249](https://linear.app/affine-design/issue/BS-2249/remove-global-types-in-model) ```ts // before matchFlavours(model, ['affine:page']); // after matchFlavours(model, [PageBlockModel]); ```
This commit is contained in:
@@ -11,7 +11,7 @@ import { track } from '@affine/track';
|
||||
import { GfxControllerIdentifier } from '@blocksuite/affine/block-std/gfx';
|
||||
import {
|
||||
matchFlavours,
|
||||
type NoteBlockModel,
|
||||
NoteBlockModel,
|
||||
NoteDisplayMode,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { Bound } from '@blocksuite/affine/global/utils';
|
||||
@@ -176,7 +176,7 @@ export const EdgelessNoteHeader = ({ note }: { note: NoteBlockModel }) => {
|
||||
const isFirstVisibleNote =
|
||||
note.parent?.children.find(
|
||||
child =>
|
||||
matchFlavours(child, ['affine:note']) &&
|
||||
matchFlavours(child, [NoteBlockModel]) &&
|
||||
child.displayMode === NoteDisplayMode.DocAndEdgeless
|
||||
) === note;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user