JWT refresh
This commit is contained in:
@@ -173,7 +173,7 @@ export default function EditRestaurantInfo(props) {
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
dispatch(refreshUserData(jwt));
|
||||
dispatch(refreshUserData());
|
||||
setState({ ...state, hidden: !state.hidden });
|
||||
dispatch(hideBackdrop());
|
||||
dispatch(notification("Widoczność zmieniona poprawnie", "success"));
|
||||
@@ -182,6 +182,7 @@ export default function EditRestaurantInfo(props) {
|
||||
console.log(err);
|
||||
dispatch(hideBackdrop());
|
||||
dispatch(notification("Wystąpił błąd :(", "error"));
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -200,7 +201,7 @@ export default function EditRestaurantInfo(props) {
|
||||
},
|
||||
})
|
||||
.then((response) => {
|
||||
dispatch(refreshUserData(jwt));
|
||||
dispatch(refreshUserData());
|
||||
dispatch(hideBackdrop());
|
||||
dispatch(notification("Restauracja została usunięta", "success"));
|
||||
history.push("/");
|
||||
@@ -209,6 +210,7 @@ export default function EditRestaurantInfo(props) {
|
||||
console.log(err);
|
||||
dispatch(hideBackdrop());
|
||||
dispatch(notification("Wystąpił nieoczekiwany błąd :(", "error"));
|
||||
throw err;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -257,6 +259,7 @@ export default function EditRestaurantInfo(props) {
|
||||
console.log(err);
|
||||
dispatch(hideBackdrop());
|
||||
dispatch(notification("Wystąpił nieoczekiwany błąd :(", "error"));
|
||||
throw err;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user