Only send search request when string length enough for api expectation.

This commit is contained in:
David Granado 2022-01-21 17:46:18 -06:00 committed by Thomas Zarebczan
parent 8b06c3df19
commit 04aa77253f

View file

@ -86,7 +86,7 @@ function ChannelContent(props: Props) {
React.useEffect(() => {
const timer = setTimeout(() => {
if (searchQuery === '' || !claimId) {
if (searchQuery.trim().length < 3 || !claimId) {
// In order to display original search results, search results must be set to null. A query of '' should display original results.
return setSearchResults(null);
} else {