Update usage of useDeleteItems

* Update usage of useDeleteItems.
* Remove async when not necessary
* Update return of promises
This commit is contained in:
nixocio
2020-11-04 14:21:48 -05:00
parent 1deb4ff5e4
commit faec21ed08
27 changed files with 65 additions and 52 deletions

View File

@@ -67,7 +67,7 @@ function NotificationTemplatesList({ i18n }) {
deletionError,
clearDeletionError,
} = useDeleteItems(
useCallback(async () => {
useCallback(() => {
return Promise.all(
selected.map(({ id }) => NotificationTemplatesAPI.destroy(id))
);