Skip to content

Commit

Permalink
Merge pull request #117 from appwrite/fix-search
Browse files Browse the repository at this point in the history
fix: search host
  • Loading branch information
TorstenDittmann authored Sep 28, 2023
2 parents e826b27 + 9f194aa commit b508a0c
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions src/lib/components/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,9 @@
let results: Hits<Props> = [];
async function search(value: string) {
return index
.search(value, {
limit: 20
})
.then((n) => {
return {
...n,
hits: n.hits.map((h) => {
const url = h.url.replace('https://website-appwrite.vercel.app', '');
return {
...h,
url
};
})
};
});
return index.search(value, {
limit: 20
});
}
async function handleInput(value: string) {
Expand Down Expand Up @@ -78,25 +65,25 @@
const recommended: Hits<Props> = [
{
uid: 'recommended-references-account',
url: 'https://website-appwrite.vercel.app/docs/references/cloud/client-web/databases',
url: '/docs/references/cloud/client-web/databases',
h1: 'References',
h2: 'Databases'
},
{
uid: 'recommended-references-teans',
url: 'https://website-appwrite.vercel.app/docs/references/cloud/client-web/teams',
url: '/docs/references/cloud/client-web/teams',
h1: 'References',
h2: 'Teams'
},
{
uid: 'recommended-references-databases',
url: 'https://website-appwrite.vercel.app/docs/references/cloud/client-web/databases',
url: '/docs/references/cloud/client-web/databases',
h1: 'References',
h2: 'Databases'
},
{
uid: 'recommended-references-storage',
url: 'https://website-appwrite.vercel.app/docs/references/cloud/client-web/storage',
url: '/docs/references/cloud/client-web/storage',
h1: 'References',
h2: 'Storage'
}
Expand Down

0 comments on commit b508a0c

Please sign in to comment.