mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
add logs
This commit is contained in:
@@ -105,12 +105,11 @@ export const SearchResults = React.forwardRef(function SearchResults(
|
||||
}
|
||||
|
||||
debounceTimeout.current = setTimeout(async () => {
|
||||
// const fetchedResults = await (global
|
||||
// ? searchAllSiteContent(query, pointer)
|
||||
// : searchSiteSpaceContent(query, pointer, revisionId));
|
||||
const fetchedResults = await (global
|
||||
? searchAllSiteContent(query, pointer)
|
||||
: searchSiteSpaceContent(query, pointer, revisionId));
|
||||
|
||||
// setResults(withAsk ? withQuestionResult(fetchedResults, query) : fetchedResults);
|
||||
setResults((prev) => withQuestionResult(prev, query));
|
||||
setResults(withAsk ? withQuestionResult(fetchedResults, query) : fetchedResults);
|
||||
|
||||
setIsLoading(false);
|
||||
|
||||
|
||||
@@ -59,6 +59,8 @@ async function searchSiteContent(args: {
|
||||
cacheBust?: string;
|
||||
}): Promise<OrderedComputedResult[]> {
|
||||
const { pointer, scope, query, cacheBust } = args;
|
||||
console.log('searchSiteContent called');
|
||||
console.log('searchSiteContent', { pointer, scope, query, cacheBust });
|
||||
|
||||
if (query.length <= 1) {
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user