Update dataProvider hooks

Change-Id: Ic19f7a6ad97b1392c96c91a19e76b8983c9d0fd2
This commit is contained in:
dklimpel
2023-02-08 09:24:02 +01:00
committed by Manuel Stahl
parent 51def5775d
commit a222af273f
5 changed files with 35 additions and 27 deletions
+3 -2
View File
@@ -17,7 +17,7 @@ export const DeviceRemoveButton = props => {
const refresh = useRefresh();
const notify = useNotify();
const [removeDevice, { isLoading }] = useDelete("devices");
const [removeDevice, { isLoading }] = useDelete();
if (!record) return null;
@@ -26,7 +26,8 @@ export const DeviceRemoveButton = props => {
const handleConfirm = () => {
removeDevice(
{ payload: { id: record.id, user_id: record.user_id } },
"devices",
{ id: record.id, meta: { user_id: record.user_id } },
{
onSuccess: () => {
notify("resources.devices.action.erase.success");