strip out netlify-preview domain from search results

This commit is contained in:
Paul Wackerow 2022-12-14 07:55:10 -08:00
parent b527950e6d
commit 523dee284d
No known key found for this signature in database
GPG Key ID: BB63E296FE9CAB8D
1 changed files with 6 additions and 1 deletions

View File

@ -9,6 +9,11 @@ export const Search: React.FC = () => {
// TODO: Replace Algolia test keys with above env vars when ready
return (
<DocSearch appId={appId} apiKey={apiKey} indexName={indexName} />
<DocSearch appId={appId} apiKey={apiKey} indexName={indexName} transformItems={
items => items.map(item => ({
...item,
url: item.url.replace('https://melodious-puffpuff-8e1109.netlify.app/', ''),
}))
} />
);
};