mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 17:46:18 +08:00
feat: add isNewDoc flag to quick search api (#7232)
This commit is contained in:
@@ -13,6 +13,7 @@ export type SearchCallbackResult =
|
||||
| {
|
||||
docId: string;
|
||||
blockId?: string;
|
||||
isNewDoc?: boolean;
|
||||
}
|
||||
| {
|
||||
query: string;
|
||||
|
||||
@@ -384,11 +384,7 @@ export const useSearchCallbackCommands = () => {
|
||||
const page = pageHelper.createPage('page', false);
|
||||
page.load();
|
||||
pageMetaHelper.setDocTitle(page.id, query);
|
||||
mixpanel.track('DocCreated', {
|
||||
control: 'cmdk',
|
||||
type: 'doc',
|
||||
});
|
||||
onSelectPage({ docId: page.id });
|
||||
onSelectPage({ docId: page.id, isNewDoc: true });
|
||||
},
|
||||
icon: <PageIcon />,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user