mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-02 22:59:56 +08:00
feat: update search result
This commit is contained in:
@@ -6,14 +6,16 @@ import { useModal } from '@/providers/global-modal-provider';
|
||||
import { IconButton } from '@/ui/button';
|
||||
|
||||
const QuickSearchFooter = () => {
|
||||
const { createPage } = useEditor();
|
||||
const { createPage, getPageMeta, openPage } = useEditor();
|
||||
const { triggerQuickSearchModal } = useModal();
|
||||
return (
|
||||
<StyledModalFooterContent>
|
||||
<IconButton>
|
||||
<MiddleAddIcon
|
||||
onClick={() => {
|
||||
createPage();
|
||||
onClick={async () => {
|
||||
const page = createPage();
|
||||
const pageMeta = getPageMeta((await page).id);
|
||||
pageMeta && openPage(pageMeta.id);
|
||||
triggerQuickSearchModal();
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user