mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
fetch user again after modification
This commit is contained in:
@@ -15,7 +15,7 @@ import EditUser from "./EditUser";
|
||||
import type { User } from "@scm-manager/ui-types";
|
||||
import type { History } from "history";
|
||||
import {
|
||||
fetchUser,
|
||||
fetchUserByName,
|
||||
deleteUser,
|
||||
getUserByName,
|
||||
isFetchUserPending,
|
||||
@@ -37,7 +37,7 @@ type Props = {
|
||||
|
||||
// dispatcher functions
|
||||
deleteUser: (user: User, callback?: () => void) => void,
|
||||
fetchUser: (string, string) => void,
|
||||
fetchUserByName: (string, string) => void,
|
||||
|
||||
// context objects
|
||||
t: string => string,
|
||||
@@ -47,7 +47,7 @@ type Props = {
|
||||
|
||||
class SingleUser extends React.Component<Props> {
|
||||
componentDidMount() {
|
||||
this.props.fetchUser(this.props.usersLink, this.props.name);
|
||||
this.props.fetchUserByName(this.props.usersLink, this.props.name);
|
||||
}
|
||||
|
||||
userDeleted = () => {
|
||||
@@ -138,8 +138,8 @@ const mapStateToProps = (state, ownProps) => {
|
||||
|
||||
const mapDispatchToProps = dispatch => {
|
||||
return {
|
||||
fetchUser: (link: string, name: string) => {
|
||||
dispatch(fetchUser(link, name));
|
||||
fetchUserByName: (link: string, name: string) => {
|
||||
dispatch(fetchUserByName(link, name));
|
||||
},
|
||||
deleteUser: (user: User, callback?: () => void) => {
|
||||
dispatch(deleteUser(user, callback));
|
||||
|
||||
Reference in New Issue
Block a user