0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-03-24 22:41:28 -05:00

fix(console): search users by phone (#2766)

This commit is contained in:
Xiao Yijun 2022-12-30 11:20:02 +08:00 committed by GitHub
parent 64e17e6f89
commit 5e48ba75f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,7 @@ const Users = () => {
const keyword = query.get('search') ?? '';
const { data, error, mutate } = useSWR<[User[], number], RequestError>(
`/api/users?page=${pageIndex}&page_size=${pageSize}&hideAdminUser=true${conditionalString(
keyword && `&search=%${keyword}%`
keyword && `&search=${encodeURIComponent(`%${keyword}%`)}`
)}`
);
const isLoading = !data && !error;