modify frontend for add multiple users
This commit is contained in:
parent
f4a888ad26
commit
4431d72e09
13 changed files with 265 additions and 135 deletions
|
|
@ -7,6 +7,7 @@ import {
|
|||
createUser,
|
||||
deleteUser,
|
||||
clearCurrentUser,
|
||||
createBatchUsers,
|
||||
} from '../redux';
|
||||
import { getUserById, getUserModalLoading, getUserslLoading } from '../redux/selectors';
|
||||
|
||||
|
|
@ -37,6 +38,10 @@ export function useUsers() {
|
|||
return dispatch(createUser(data));
|
||||
}
|
||||
|
||||
function createUsers(data: any) {
|
||||
return dispatch(createBatchUsers(data));
|
||||
}
|
||||
|
||||
function deleteUserById(id: string) {
|
||||
return dispatch(deleteUser(id));
|
||||
}
|
||||
|
|
@ -52,5 +57,6 @@ export function useUsers() {
|
|||
createNewUser,
|
||||
deleteUserById,
|
||||
clearSelectedUser,
|
||||
createUsers,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue