Skip to content
This repository has been archived by the owner on Jun 11, 2021. It is now read-only.

Commit

Permalink
fix(website): update netlify.com to netlify.app
Browse files Browse the repository at this point in the history
  • Loading branch information
francoischalifour committed Jun 5, 2020
1 parent 7e6582c commit 9cbb80b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module.exports = {
title: 'Autocomplete',
tagline: 'JavaScript library for building autocomplete search experiences.',
url: 'https://autocomplete-experimental.netlify.com',
url: 'https://autocomplete-experimental.netlify.app',
baseUrl: '/',
favicon: 'img/logo.png',
organizationName: 'algolia',
Expand All @@ -23,7 +23,7 @@ module.exports = {
position: 'right',
},
{
href: 'https://autocomplete-experimental.netlify.com/stories',
href: 'https://autocomplete-experimental.netlify.app/stories',
label: 'Stories',
position: 'right',
},
Expand Down
9 changes: 9 additions & 0 deletions packages/website/src/theme/SearchBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ function Hit({ hit, children }) {
return <Link to={hit.url}>{children}</Link>;
}

function ResultsFooter({ state }) {
return (
<Link to={`/search?q=${state.query}`}>
See {state.context.nbHits} results
</Link>
);
}

function DocSearch({ indexName, appId, apiKey, searchParameters }) {
const history = useHistory();
const [isOpen, setIsOpen] = useState(false);
Expand Down Expand Up @@ -91,6 +99,7 @@ function DocSearch({ indexName, appId, apiKey, searchParameters }) {
});
}}
hitComponent={Hit}
resultsFooterComponent={ResultsFooter}
/>,
document.body
)}
Expand Down

0 comments on commit 9cbb80b

Please sign in to comment.