fix(export/share): navigation in search not working

This commit is contained in:
Elian Doran
2025-10-29 14:57:53 +02:00
parent cf8089b07f
commit 08e66c18e7
2 changed files with 11 additions and 3 deletions

View File

@@ -70,12 +70,15 @@ async function fetchResults(query: string): Promise<SearchResults> {
keys: [
"title",
"content"
]
],
includeScore: true
});
const results = fuse.search<SearchResult>(query);
const results = fuse.search<SearchResult>(query, { limit: 5 });
console.debug("Search results:", results);
const processedResults = results.map(({ item, score }) => ({
...item,
id: rootUrl + "/" + item.id,
score
}));
return { results: processedResults };