Skip to content

Commit

Permalink
Update Header.tsx (#6661)
Browse files Browse the repository at this point in the history
  • Loading branch information
bladey authored Sep 28, 2021
1 parent 97ec32d commit ae2134b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ export function Header() {
algoliaOptions: {
facetFilters: ['tags:stable'],
},
transformData: (results: any) => {
if (window.location.hostname == 'keystonejs.com') return results;
return results.map((result: object) => {
// @ts-ignore
result.url = result.url.replace('https://keystonejs.com', window.location.origin);
return result;
});
},
});
} else if (searchAttempt >= 10) {
// @ts-ignore
Expand Down

1 comment on commit ae2134b

@vercel
Copy link

@vercel vercel bot commented on ae2134b Sep 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.