diff --git a/themes/NEXT/components/SearchInput.js b/themes/NEXT/components/SearchInput.js index 2b4e88be..99e54ec1 100644 --- a/themes/NEXT/components/SearchInput.js +++ b/themes/NEXT/components/SearchInput.js @@ -15,7 +15,8 @@ const SearchInput = ({ currentTag, currentSearch, cRef }) => { } } }) - const handleSearch = (key) => { + const handleSearch = () => { + const key = searchInputRef.current.value if (key && key !== '') { setLoadingState(true) // router.push({ pathname: '/search/' + key }).then(r => { @@ -62,7 +63,7 @@ const SearchInput = ({ currentTag, currentSearch, cRef }) => { {(showClean && )}