fix: suppress algolia errors (#39703)

pull/39707/head
Kristofer Koishigawa 2020-09-27 19:55:11 +09:00 committed by GitHub
parent b16c0641bf
commit 0a0fe2bae5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -24,7 +24,7 @@ const DEBOUNCE_TIME = 100;
const searchClient =
algoliaAppId && algoliaAPIKey
? algoliasearch(algoliaAppId, algoliaAPIKey)
: {};
: { search: () => {} };
const propTypes = {
children: PropTypes.any,

View File

@ -59,7 +59,11 @@ const CustomHits = connectHits(
key={hit.objectID}
>
{noHits ? (
<NoHitsSuggestion title={noHitsTitle} />
<NoHitsSuggestion
handleMouseEnter={handleMouseEnter}
handleMouseLeave={handleMouseLeave}
title={noHitsTitle}
/>
) : (
<Suggestion
handleMouseEnter={handleMouseEnter}