diff --git a/app/components/JinshenHeader.vue b/app/components/JinshenHeader.vue index e7021ce..a593192 100644 --- a/app/components/JinshenHeader.vue +++ b/app/components/JinshenHeader.vue @@ -77,11 +77,11 @@ const handleSearch = () => { const trimmed = searchQuery.value.trim(); if (!trimmed) return; navigateTo({ - path: localePath('/search'), + path: localePath("/search"), query: { - query: trimmed - } - }) + query: trimmed, + }, + }); searchQuery.value = ""; }; diff --git a/app/composables/useMeilisearch.ts b/app/composables/useMeilisearch.ts index d3d30bc..bcdce46 100644 --- a/app/composables/useMeilisearch.ts +++ b/app/composables/useMeilisearch.ts @@ -41,7 +41,7 @@ export const useMeilisearch = () => { let meiliClient: MeiliSearch | null = null; const ensureClient = () => { - if(meiliClient) return meiliClient; + if (meiliClient) return meiliClient; const host = runtimeConfig.public?.meili?.host; if (!host) { @@ -86,7 +86,8 @@ export const useMeilisearch = () => { indexUid, response: { hits: safeResponse.hits, - estimatedTotalHits: safeResponse.estimatedTotalHits ?? safeResponse.hits.length, + estimatedTotalHits: + safeResponse.estimatedTotalHits ?? safeResponse.hits.length, processingTimeMs: safeResponse.processingTimeMs ?? 0, query: safeResponse.query, }, @@ -98,7 +99,10 @@ export const useMeilisearch = () => { const settled = await Promise.allSettled(requests); settled - .filter((result): result is PromiseRejectedResult => result.status === "rejected") + .filter( + (result): result is PromiseRejectedResult => + result.status === "rejected" + ) .forEach((result) => { console.error("Meilisearch query failed", result.reason); });