fix(v2): custom searchbar should appear even if themeconfig.algolia is undefined (#1909)

* fix(v2): custom searchbar should appear even if themeconfig.algolia is undefined

* nits

* Docs docs

* inaccuracy

* changelog

* nits
This commit is contained in:
Endi 2019-10-30 07:51:53 +07:00 committed by Yangshun Tay
parent f853171791
commit 64871b76e4
6 changed files with 67 additions and 13 deletions

View file

@ -8,7 +8,6 @@
import React, {
useState,
useEffect,
Fragment,
useContext,
useRef,
useCallback,
@ -60,7 +59,7 @@ const Search = props => {
);
return isEnabled ? (
<Fragment>
<div className="navbar__search" key="search-box">
<span
role="button"
className={classnames('search-icon', {
@ -84,7 +83,7 @@ const Search = props => {
onBlur={toggleSearchIconClick}
ref={searchBarRef}
/>
</Fragment>
</div>
) : null;
};