Update redux with info for newly created user (#1421)
This commit is contained in:
@@ -28,11 +28,10 @@ export const requirePasswordResetFailure = (errors) => {
|
||||
};
|
||||
};
|
||||
|
||||
// TODO does below need user
|
||||
export const createUserWithoutInviteSuccess = () => {
|
||||
export const createUserWithoutInviteSuccess = (user) => {
|
||||
return {
|
||||
type: CREATE_USER_WITHOUT_INVITE_SUCCESS,
|
||||
payload: {},
|
||||
payload: { user },
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ export default (state = initialState, { type, payload }) => {
|
||||
loading: false,
|
||||
data: {
|
||||
...state.data,
|
||||
[payload.user.id]: payload.user,
|
||||
},
|
||||
};
|
||||
case CREATE_USER_WITHOUT_INVITE_FAILURE:
|
||||
|
||||
Reference in New Issue
Block a user