diff --git a/src/Components/Users/UserDeleteDialog.tsx b/src/Components/Users/UserDeleteDialog.tsx index 720d05bb508..87a2342279d 100644 --- a/src/Components/Users/UserDeleteDialog.tsx +++ b/src/Components/Users/UserDeleteDialog.tsx @@ -1,11 +1,4 @@ -import React, { useState } from "react"; -import { - Dialog, - DialogContent, - DialogContentText, - DialogActions, - Button, -} from "@material-ui/core"; +import ConfirmDialogV2 from "../Common/ConfirmDialogV2"; interface ConfirmDialogProps { name: string; @@ -14,39 +7,20 @@ interface ConfirmDialogProps { } const UserDeleteDialog = (props: ConfirmDialogProps) => { - const { name, handleCancel, handleOk } = props; - - const [disable, setDisable] = useState(false); - - const handleSubmit = () => { - handleOk(); - setDisable(true); - }; return ( - - - - - Are you sure you want to delete user {name} ? - - - - - - Cancel - - - Delete - - - + + Are you sure you want to delete user {props.name} ? + + } + action="Delete" + variant="danger" + show + onConfirm={props.handleOk} + onClose={props.handleCancel} + /> ); };