Fix search user (#29615)

* Fix search user

* Tiny
This commit is contained in:
Joshen Lim authored and GitHub committed 2024-10-01 18:58:22 +08:00
1 parent cb1e3a8170
commit 2e7745883a
2 files changed
+2 -2

No files matched your search

@@ -123,7 +123,7 @@ export const UsersV2 = () => {
})
// eslint-disable-next-line react-hooks/exhaustive-deps
const totalUsers = useMemo(() => countData?.result[0].count, [countData?.result[0].count])
const totalUsers = useMemo(() => countData?.result[0].count ?? 0, [countData?.result[0].count])
const users = useMemo(() => data?.pages.flatMap((page) => page.result), [data?.pages])
const handleScroll = (event: UIEvent<HTMLDivElement>) => {
@@ -43,7 +43,7 @@ const getUsersSQL = ({
if (hasValidKeywords) {
conditions.push(
`id::text ilike '%${keywords}%' or email ilike '%${keywords}%' or phone ilike '%${keywords}%`
`id::text ilike '%${keywords}%' or email ilike '%${keywords}%' or phone ilike '%${keywords}%'`
)
}