40 lines
947 B
JavaScript
40 lines
947 B
JavaScript
import {
|
|
Dialog,
|
|
DialogTitle,
|
|
DialogContent,
|
|
DialogContentText,
|
|
DialogActions,
|
|
Button,
|
|
} from "@mui/material";
|
|
import { useTranslations } from "next-intl";
|
|
|
|
const ConfirmForm = ({
|
|
open,
|
|
handleClose,
|
|
handleDelete,
|
|
rowId,
|
|
deleteData,
|
|
}) => {
|
|
const t = useTranslations();
|
|
const handleDeleteExpert = () => {
|
|
handleDelete();
|
|
};
|
|
return (
|
|
<Dialog open={open} onClose={handleClose}>
|
|
<DialogTitle>{t("ConfirmDialog.confirm")}</DialogTitle>
|
|
<DialogContent>
|
|
<DialogContentText>{t("ConfirmDialog.context")}</DialogContentText>
|
|
</DialogContent>
|
|
<DialogActions>
|
|
<Button onClick={handleDeleteExpert} color="primary">
|
|
{t("ConfirmDialog.button-confirm")}
|
|
</Button>
|
|
<Button onClick={handleClose} color="secondary" autoFocus>
|
|
{t("ConfirmDialog.button-cancel")}
|
|
</Button>
|
|
</DialogActions>
|
|
</Dialog>
|
|
);
|
|
};
|
|
export default ConfirmForm;
|