JWT refresh
This commit is contained in:
@@ -69,11 +69,12 @@ export default function EditRestaurantMenu(props) {
|
||||
.then((res) => {
|
||||
dispatch(hideBackdrop());
|
||||
dispatch(notification("Dodano kategorię.", "success"));
|
||||
dispatch(refreshUserData(token));
|
||||
dispatch(refreshUserData());
|
||||
})
|
||||
.catch((e) => {
|
||||
dispatch(hideBackdrop());
|
||||
dispatch(notification("Nie udało się dodać kategorii :(", "error"));
|
||||
throw e;
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -96,11 +97,12 @@ export default function EditRestaurantMenu(props) {
|
||||
.then((res) => {
|
||||
dispatch(hideBackdrop());
|
||||
dispatch(notification("Usunięto kategorię.", "success"));
|
||||
dispatch(refreshUserData(token));
|
||||
dispatch(refreshUserData());
|
||||
})
|
||||
.catch((e) => {
|
||||
dispatch(hideBackdrop());
|
||||
dispatch(notification("Nie udało się usunąć kategorii :(", "error"));
|
||||
throw e;
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user