Paginate servers on frontend; closes #2106

This commit is contained in:
Dane Everitt
2020-07-14 20:48:41 -07:00
parent 03abc1764d
commit 6c0d308348
5 changed files with 122 additions and 20 deletions

View File

@@ -57,7 +57,7 @@ export default ({ ...props }: Props) => {
setSubmitting(false);
clearFlashes('search');
getServers(term)
getServers({ query: term })
.then(servers => setServers(servers.items.filter((_, index) => index < 5)))
.catch(error => {
console.error(error);