Support much better server querying from frontend

Search all servers if making a query as an admin, allow searching by a more complex set of data, fix unfocus on search field when loading indicator was rendered
This commit is contained in:
Dane Everitt 2020-10-15 21:21:38 -07:00
parent 9726a0de46
commit f30dab053b
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
6 changed files with 152 additions and 75 deletions

View file

@ -21,7 +21,7 @@ export default () => {
const { data: servers, error } = useSWR<PaginatedResult<Server>>(
[ '/api/client/servers', showOnlyAdmin, page ],
() => getServers({ onlyAdmin: showOnlyAdmin, page }),
() => getServers({ page, type: showOnlyAdmin ? 'admin' : undefined }),
);
useEffect(() => {