From 69a7f3525a3ad5233a761db690d599e607f0a0d7 Mon Sep 17 00:00:00 2001 From: Yasiu1376 Date: Sun, 16 Jul 2023 15:41:58 +0330 Subject: [PATCH] add notification to datatable --- src/lib/app/hooks/useDatatable.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/app/hooks/useDatatable.jsx b/src/lib/app/hooks/useDatatable.jsx index 2a9d31f..8b097b1 100644 --- a/src/lib/app/hooks/useDatatable.jsx +++ b/src/lib/app/hooks/useDatatable.jsx @@ -49,8 +49,9 @@ const useDataTable = () => { .post(`${url}/${rowID}`, values, { headers: { authorization: `Bearer ${token}` }, }) - .then(() => { + .then((response) => { setReloadDataTable(true); + Notifications(directionApp, response, t); }) .catch((error) => { Notifications(directionApp, error.response, t); @@ -63,8 +64,9 @@ const useDataTable = () => { .post(`${url}/${rowID}`, values, { headers: { authorization: `Bearer ${token}` }, }) - .then(() => { + .then((response) => { setReloadDataTable(true); + Notifications(directionApp, response, t); }) .catch((error) => { Notifications(directionApp, error.response, t);