diff --git a/app/components/search.tsx b/app/components/search.tsx index 1d79f7b9..de6e9112 100644 --- a/app/components/search.tsx +++ b/app/components/search.tsx @@ -37,7 +37,7 @@ export default function Search({ const [urlSearchParams] = useSearchParams() const placeholder = urlSearchParams.get('placeholder') ?? 'Search for more questions here...' - const {search, arePendingSearches, results} = useSearch(onSiteAnswersRef, limitFromUrl) + const {search, isPendingSearch, results} = useSearch(onSiteAnswersRef, limitFromUrl) const searchFn = (rawValue: string) => { const value = rawValue.trim() @@ -108,8 +108,8 @@ export default function Search({ /> -
- {arePendingSearches && results.length == 0 && ( +
+ {isPendingSearch && results.length == 0 && (
Searching for questions...
)} @@ -135,7 +135,7 @@ export default function Search({ }} /> ))} - {showResults && results.length === 0 && !arePendingSearches && (no results)} + {showResults && results.length === 0 && !isPendingSearch && (no results)} {!queryFromUrl && (