сам action
export const setLoadById = (id, data, actionType) => {
return async dispatch => {
httpPost({
url: _____
,
data,
headers: {
"Content-Type": "multipart/form-data"
}
})
.then(res => {
dispatch(fetchLoads(actionType))
dispatch(fetchLoadById(id))
notyf.success('Load was modified successfully')
})
.catch(er => {
console.log(er);
});
}
}