strip out netlify-preview domain from search results

pull/26459/head^2
Paul Wackerow 2 years ago
parent b527950e6d
commit 523dee284d
No known key found for this signature in database
GPG Key ID: BB63E296FE9CAB8D
  1. 7
      src/components/UI/Search.tsx

@ -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/', ''),
}))
} />
);
};

Loading…
Cancel
Save