+ {debouncedQuery.length < MIN_SEARCH_QUERY_LENGTH ? (
+
+ Type at least two characters to search.
+
+ ) : searchQuery.isLoading && results.length === 0 ? (
+
+
+ Searching...
+
+ ) : searchQuery.error instanceof Error && results.length === 0 ? (
+
+ {searchQuery.error.message}
+
+ ) : results.length === 0 ? (
+
+ No matches found.
+
+ ) : (
+
+ {results.map((result, index) => (
+
+ ))}
+
+ )}
+