add notification to datatable

This commit is contained in:
Yasiu1376
2023-07-16 15:41:58 +03:30
parent 7d5d69203f
commit 69a7f3525a

View File

@@ -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);