reduce throttle and search bar all fields

This commit is contained in:
“spicecat” 2022-08-17 21:18:01 -04:00
commit a7ffc886d3
2 changed files with 5 additions and 3 deletions

View file

@ -15,11 +15,13 @@ export default function SearchBarController() {
e.preventDefault();
if (location.pathname === '/questions/search') {
setSearchParams({ title: search }, { replace: true });
setSearchParams({ title: search, text: search, creator: search }, { replace: true });
} else {
navigate({
pathname: '/questions/search',
search: `?${createSearchParams({ title: search })}`,
search: `?${createSearchParams({
title: search, text: search, creator: search
})}`,
replace: true,
});
}

View file

@ -3,7 +3,7 @@ const superagent = require('superagent');
const Throttle = require('superagent-throttle');
const throttle = new Throttle({
active: true,
rate: 5,
rate: 2,
ratePer: 1000,
concurrent: 2,
});