mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +01:00
renamed navlink to simple delete
This commit is contained in:
@@ -1,20 +1,8 @@
|
||||
// @flow
|
||||
import React from "react";
|
||||
import { translate } from "react-i18next";
|
||||
import { Subtitle, DeleteButton, confirmAlert } from "@scm-manager/ui-components";
|
||||
import type { User } from "@scm-manager/ui-types";
|
||||
import {
|
||||
Subtitle,
|
||||
DeleteButton,
|
||||
confirmAlert
|
||||
} from "@scm-manager/ui-components";
|
||||
import { connect } from "react-redux";
|
||||
import {
|
||||
deleteUser,
|
||||
fetchUserByName,
|
||||
getDeleteUserFailure,
|
||||
getUserByName,
|
||||
isDeleteUserPending
|
||||
} from "../modules/users";
|
||||
import type { History } from "history";
|
||||
|
||||
type Props = {
|
||||
@@ -31,6 +19,10 @@ type Props = {
|
||||
};
|
||||
|
||||
class DeleteUser extends React.Component<Props> {
|
||||
static defaultProps = {
|
||||
confirmDialog: true
|
||||
};
|
||||
|
||||
userDeleted = () => {
|
||||
this.props.history.push("/users");
|
||||
};
|
||||
@@ -39,10 +31,6 @@ class DeleteUser extends React.Component<Props> {
|
||||
this.props.deleteUser(user, this.userDeleted);
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
confirmDialog: true
|
||||
};
|
||||
|
||||
deleteUser = () => {
|
||||
this.props.deleteUser(this.props.user);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user