Skip to content

Commit

Permalink
fix: user generic function to check user's email is valid or not
Browse files Browse the repository at this point in the history
  • Loading branch information
ss-nikunj committed Oct 11, 2024
1 parent 81c652e commit 9dd67c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/shared/frame/UserList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 9dd67c0

Please sign in to comment.