From 9dd67c044e8f5e6f7641b18af6c4e680d79a73f6 Mon Sep 17 00:00:00 2001 From: Nikunj Maniya Date: Fri, 11 Oct 2024 17:09:17 +0530 Subject: [PATCH] fix: user generic function to check user's email is valid or not --- src/components/shared/frame/UserList/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/shared/frame/UserList/index.tsx b/src/components/shared/frame/UserList/index.tsx index 31e567e3b..c56248041 100644 --- a/src/components/shared/frame/UserList/index.tsx +++ b/src/components/shared/frame/UserList/index.tsx @@ -33,7 +33,7 @@ import type { TenantUser } from 'features/admin/userApiSlice' import './style.scss' import { setSearchInput } from 'features/appManagement/actions' import { appManagementSelector } from 'features/appManagement/slice' -import Patterns from 'types/Patterns' +import { isSearchUserEmail } from 'types/Patterns' interface FetchHookArgsType { appId?: string @@ -88,7 +88,7 @@ export const UserList = ({ const searchInputData = useSelector(appManagementSelector) const validateSearchText = (expr: string) => { - const validateExpr = Patterns.EMAIL_SEARCH.test(expr) + const validateExpr = isSearchUserEmail(expr) if (validateExpr) dispatch(setSearchInput({ open: true, text: expr })) return validateExpr }