Update usage of useNotify
hook
This commit is contained in:
parent
0f4c382c18
commit
7fba7388ba
@ -132,7 +132,7 @@ const LoginPage = ({ theme }) => {
|
|||||||
: typeof error === "undefined" || !error.message
|
: typeof error === "undefined" || !error.message
|
||||||
? "ra.auth.sign_in_error"
|
? "ra.auth.sign_in_error"
|
||||||
: error.message,
|
: error.message,
|
||||||
"warning"
|
{ type: "warning" }
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -87,7 +87,9 @@ export const RoomDirectoryBulkSaveButton = ({ selectedIds }) => {
|
|||||||
refresh();
|
refresh();
|
||||||
},
|
},
|
||||||
onFailure: error =>
|
onFailure: error =>
|
||||||
notify("resources.room_directory.action.send_failure", "error"),
|
notify("resources.room_directory.action.send_failure", {
|
||||||
|
type: "error",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -119,7 +121,9 @@ export const RoomDirectorySaveButton = ({ record }) => {
|
|||||||
refresh();
|
refresh();
|
||||||
},
|
},
|
||||||
onFailure: error =>
|
onFailure: error =>
|
||||||
notify("resources.room_directory.action.send_failure", "error"),
|
notify("resources.room_directory.action.send_failure", {
|
||||||
|
type: "error",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -81,7 +81,9 @@ export const ServerNoticeButton = ({ record }) => {
|
|||||||
handleDialogClose();
|
handleDialogClose();
|
||||||
},
|
},
|
||||||
onFailure: () =>
|
onFailure: () =>
|
||||||
notify("resources.servernotices.action.send_failure", "error"),
|
notify("resources.servernotices.action.send_failure", {
|
||||||
|
type: "error",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -127,7 +129,9 @@ export const ServerNoticeBulkButton = ({ selectedIds }) => {
|
|||||||
handleDialogClose();
|
handleDialogClose();
|
||||||
},
|
},
|
||||||
onFailure: error =>
|
onFailure: error =>
|
||||||
notify("resources.servernotices.action.send_failure", "error"),
|
notify("resources.servernotices.action.send_failure", {
|
||||||
|
type: "error",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -57,7 +57,7 @@ export const DeviceRemoveButton = props => {
|
|||||||
refresh();
|
refresh();
|
||||||
},
|
},
|
||||||
onFailure: () =>
|
onFailure: () =>
|
||||||
notify("resources.devices.action.erase.failure", "error"),
|
notify("resources.devices.action.erase.failure", { type: "error" }),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
|
@ -127,7 +127,9 @@ export const DeleteMediaButton = props => {
|
|||||||
handleDialogClose();
|
handleDialogClose();
|
||||||
},
|
},
|
||||||
onFailure: () =>
|
onFailure: () =>
|
||||||
notify("resources.delete_media.action.send_failure", "error"),
|
notify("resources.delete_media.action.send_failure", {
|
||||||
|
type: "error",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -170,7 +172,9 @@ export const ProtectMediaButton = props => {
|
|||||||
refresh();
|
refresh();
|
||||||
},
|
},
|
||||||
onFailure: () =>
|
onFailure: () =>
|
||||||
notify("resources.protect_media.action.send_failure", "error"),
|
notify("resources.protect_media.action.send_failure", {
|
||||||
|
type: "error",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -184,7 +188,9 @@ export const ProtectMediaButton = props => {
|
|||||||
refresh();
|
refresh();
|
||||||
},
|
},
|
||||||
onFailure: () =>
|
onFailure: () =>
|
||||||
notify("resources.protect_media.action.send_failure", "error"),
|
notify("resources.protect_media.action.send_failure", {
|
||||||
|
type: "error",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -262,7 +268,9 @@ export const QuarantineMediaButton = props => {
|
|||||||
refresh();
|
refresh();
|
||||||
},
|
},
|
||||||
onFailure: () =>
|
onFailure: () =>
|
||||||
notify("resources.quarantine_media.action.send_failure", "error"),
|
notify("resources.quarantine_media.action.send_failure", {
|
||||||
|
type: "error",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@ -276,7 +284,9 @@ export const QuarantineMediaButton = props => {
|
|||||||
refresh();
|
refresh();
|
||||||
},
|
},
|
||||||
onFailure: () =>
|
onFailure: () =>
|
||||||
notify("resources.quarantine_media.action.send_failure", "error"),
|
notify("resources.quarantine_media.action.send_failure", {
|
||||||
|
type: "error",
|
||||||
|
}),
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user