correcting input type of used deleteUser method

This commit is contained in:
Maren Süwer
2018-07-17 16:32:42 +02:00
parent 06cfc3e4db
commit 1bff4b9067
3 changed files with 5 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ import { confirmAlert } from '../../components/ConfirmAlert';
type Props = {
user: User,
confirmDialog?: boolean,
deleteUser: (link: string) => void,
deleteUser: (user: User) => void,
};
class DeleteUserButton extends React.Component<Props> {
@@ -16,7 +16,7 @@ class DeleteUserButton extends React.Component<Props> {
};
deleteUser = () => {
this.props.deleteUser(this.props.user._links.delete.href);
this.props.deleteUser(this.props.user);
};
confirmDelete = () =>{

View File

@@ -6,7 +6,7 @@ import type { User } from "../types/User";
type Props = {
entry: { loading: boolean, error: Error, user: User },
deleteUser: string => void,
deleteUser: User => void,
editUser: User => void
};

View File

@@ -20,7 +20,7 @@ type Props = {
error: Error,
userEntries: Array<UserEntry>,
fetchUsers: () => void,
deleteUser: string => void,
deleteUser: User => void,
addUser: User => void,
updateUser: User => void,
editUser: User => void,