Add keyword length limit to search function to prevent search overload
This commit is contained in:
@@ -52,6 +52,10 @@ export default function SearchPage() {
|
||||
toast({ title: "Enter a Keyword", description: "Please enter one keyword at least." });
|
||||
return;
|
||||
}
|
||||
if (searchText.length < 10) {
|
||||
toast({ title: "Keywords too short", description: "Keyword length must be at least 10." });
|
||||
return;
|
||||
}
|
||||
querySearch.refetch();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user