mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
refactor: remove the seachhistoryRef
This commit is contained in:
parent
252338c284
commit
5562dbe6e9
1 changed files with 1 additions and 2 deletions
|
|
@ -23,7 +23,6 @@ const SearchBar = React.memo(({ className, query, active }) => {
|
|||
const [currentQuery, setCurrentQuery] = React.useState(query || '');
|
||||
const localSearch = useLocalSearch(currentQuery);
|
||||
const searchInputRef = React.useRef(null);
|
||||
const searchHistoryRef = React.useRef(null);
|
||||
|
||||
const searchBarOnClick = React.useCallback(() => {
|
||||
if (!active) {
|
||||
|
|
@ -117,7 +116,7 @@ const SearchBar = React.memo(({ className, query, active }) => {
|
|||
}
|
||||
{
|
||||
showHistory ?
|
||||
<div className={styles['search-history']} ref={searchHistoryRef}>
|
||||
<div className={styles['search-history']}>
|
||||
{
|
||||
localSearch.searchResults.length === 0 && searchHistory.items.length === 0 ?
|
||||
<div className={styles['search-history-label']}>{ t('Start typing ...') }</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue