diff --git a/src/components/devices.jsx b/src/components/devices.jsx
index 7a5069a..b5fe4ed 100644
--- a/src/components/devices.jsx
+++ b/src/components/devices.jsx
@@ -1,29 +1,21 @@
-import React, { useState } from "react";
+import React from "react";
import {
- Button,
+ DeleteButton,
useDelete,
useNotify,
- Confirm,
useRecordContext,
useRefresh,
} from "react-admin";
-import ActionDelete from "@mui/icons-material/Delete";
-import { alpha, useTheme } from "@mui/material/styles";
export const DeviceRemoveButton = props => {
- const theme = useTheme();
const record = useRecordContext();
- const [open, setOpen] = useState(false);
const refresh = useRefresh();
const notify = useNotify();
- const [removeDevice, { isLoading }] = useDelete();
+ const [removeDevice] = useDelete();
if (!record) return null;
- const handleClick = () => setOpen(true);
- const handleDialogClose = () => setOpen(false);
-
const handleConfirm = () => {
removeDevice(
"devices",
@@ -39,40 +31,21 @@ export const DeviceRemoveButton = props => {
},
}
);
- setOpen(false);
};
return (
- <>
-
-
- >
+
);
};