Submit
Path:
~
/
/
usr
/
share
/
grafana
/
public
/
app
/
features
/
invites
/
state
/
File Content:
selectors.ts
import { EntityState, createSelector } from '@reduxjs/toolkit'; import { Invitee } from 'app/types'; import { selectors } from './reducers'; export const { selectAll, selectById, selectTotal } = selectors; const selectQuery = (_state: EntityState<Invitee>, query: string) => query; export const selectInvitesMatchingQuery = createSelector([selectAll, selectQuery], (invites, searchQuery) => { const regex = new RegExp(searchQuery, 'i'); const matches = invites.filter((invite) => regex.test(invite.name) || regex.test(invite.email)); return matches; });
Submit
FILE
FOLDER
INFO
Name
Size
Permission
Action
actions.ts
906 bytes
0644
reducers.test.ts
1546 bytes
0644
reducers.ts
1253 bytes
0644
selectors.ts
564 bytes
0644
N4ST4R_ID | Naxtarrr