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 = { type Props = {
user: User, user: User,
confirmDialog?: boolean, confirmDialog?: boolean,
deleteUser: (link: string) => void, deleteUser: (user: User) => void,
}; };
class DeleteUserButton extends React.Component<Props> { class DeleteUserButton extends React.Component<Props> {
@@ -16,7 +16,7 @@ class DeleteUserButton extends React.Component<Props> {
}; };
deleteUser = () => { deleteUser = () => {
this.props.deleteUser(this.props.user._links.delete.href); this.props.deleteUser(this.props.user);
}; };
confirmDelete = () =>{ confirmDelete = () =>{

View File

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

View File

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