mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 19:46:32 +08:00
chore: remove unreasonable import
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Page } from '@blocksuite/store';
|
||||
import { QueryContent } from '@blocksuite/store/dist/workspace/search';
|
||||
import { PageMeta } from '@/providers/editor-provider';
|
||||
import { useAppState } from '@/providers/app-state-provider';
|
||||
|
||||
@@ -13,7 +12,7 @@ export type EditorHandlers = {
|
||||
toggleDeletePage: (pageId: string) => void;
|
||||
toggleFavoritePage: (pageId: string) => void;
|
||||
// permanentlyDeletePage: (pageId: string) => void;
|
||||
search: (query: QueryContent) => Map<string, string | undefined>;
|
||||
search: (query: string) => Map<string, string | undefined>;
|
||||
// changeEditorMode: (pageId: string) => void;
|
||||
};
|
||||
|
||||
@@ -45,7 +44,7 @@ export const usePageHelper = (): EditorHandlers => {
|
||||
});
|
||||
}
|
||||
},
|
||||
search: (query: QueryContent) => {
|
||||
search: (query: string) => {
|
||||
return currentWorkspace!.search(query);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -7,7 +7,6 @@ import type {
|
||||
Workspace as StoreWorkspace,
|
||||
} from '@blocksuite/store';
|
||||
import type { EditorContainer } from '@blocksuite/editor';
|
||||
import { QueryContent } from '@blocksuite/store/dist/workspace/search';
|
||||
|
||||
export type LoadWorkspaceHandler = (
|
||||
workspaceId: string
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { QueryContent } from '@blocksuite/store/dist/workspace/search';
|
||||
import { createPage, generateDefaultPageId, initPage } from '../utils';
|
||||
import { Workspace, Page } from '@blocksuite/store';
|
||||
import { useRouter } from 'next/router';
|
||||
@@ -70,9 +69,6 @@ export const useEditorHandler = ({
|
||||
);
|
||||
}
|
||||
},
|
||||
search: (query: QueryContent) => {
|
||||
return workspace!.search(query);
|
||||
},
|
||||
changeEditorMode: (pageId: string) => {
|
||||
editor!.mode = editor!.mode === 'page' ? 'edgeless' : 'page';
|
||||
workspace?.setPageMeta(pageId, { mode: editor!.mode });
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { PropsWithChildren } from 'react';
|
||||
import { Page } from '@blocksuite/store';
|
||||
import { QueryContent } from '@blocksuite/store/dist/workspace/search';
|
||||
import { PageMeta as OriginalPageMeta } from '@blocksuite/store';
|
||||
import { EditorContainer } from '@blocksuite/editor';
|
||||
|
||||
@@ -35,6 +34,5 @@ export type EditorHandlers = {
|
||||
toggleDeletePage: (pageId: string) => void;
|
||||
toggleFavoritePage: (pageId: string) => void;
|
||||
permanentlyDeletePage: (pageId: string) => void;
|
||||
search: (query: QueryContent) => Map<string, string | undefined>;
|
||||
changeEditorMode: (pageId: string) => void;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user