fix(app-status): rely on server status after update

This commit is contained in:
Nicolas Meienberger 2023-11-27 08:10:29 +01:00
parent a1515ac7b8
commit cfeb9d4e19

View file

@ -94,11 +94,11 @@ export const AppDetailsContainer: React.FC<IProps> = ({ app, localDomain }) => {
const updateMutation = useAction(updateAppAction, {
onSuccess: (data) => {
setCustomStatus(app.status);
if (!data.success) {
setCustomStatus(app.status);
toast.error(data.failure.reason);
} else {
setCustomStatus('stopped');
toast.success(t('apps.app-details.update-success'));
}
},