From 5e48ba75f6322b3b25a0ccb3c568c12e0f3e0c72 Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Fri, 30 Dec 2022 11:20:02 +0800 Subject: [PATCH] fix(console): search users by phone (#2766) --- packages/console/src/pages/Users/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/console/src/pages/Users/index.tsx b/packages/console/src/pages/Users/index.tsx index 6ad65992f..70d0de65a 100644 --- a/packages/console/src/pages/Users/index.tsx +++ b/packages/console/src/pages/Users/index.tsx @@ -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;