mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 03:56:23 +08:00
feat(nbstore): add indexer storage (#10953)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { DocsSearchService } from '@affine/core/modules/docs-search';
|
||||
import { LiveData, useLiveData, useService } from '@toeverything/infra';
|
||||
import { type ReactNode, useMemo } from 'react';
|
||||
import { type ReactNode, useEffect, useMemo } from 'react';
|
||||
|
||||
interface PagePreviewProps {
|
||||
pageId: string;
|
||||
@@ -21,6 +21,11 @@ const PagePreviewInner = ({
|
||||
)
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const undo = docSummary.indexer.addPriority(pageId, 100);
|
||||
return undo;
|
||||
}, [docSummary, pageId]);
|
||||
|
||||
const res =
|
||||
summary === null ? fallback : summary === '' ? emptyFallback : summary;
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user