fix(app-status): rely on server status after update
This commit is contained in:
parent
203db0160a
commit
64325150d5
1 changed files with 2 additions and 2 deletions
|
@ -94,11 +94,11 @@ export const AppDetailsContainer: React.FC<IProps> = ({ app, localDomain }) => {
|
||||||
|
|
||||||
const updateMutation = useAction(updateAppAction, {
|
const updateMutation = useAction(updateAppAction, {
|
||||||
onSuccess: (data) => {
|
onSuccess: (data) => {
|
||||||
|
setCustomStatus(app.status);
|
||||||
|
|
||||||
if (!data.success) {
|
if (!data.success) {
|
||||||
setCustomStatus(app.status);
|
|
||||||
toast.error(data.failure.reason);
|
toast.error(data.failure.reason);
|
||||||
} else {
|
} else {
|
||||||
setCustomStatus('stopped');
|
|
||||||
toast.success(t('apps.app-details.update-success'));
|
toast.success(t('apps.app-details.update-success'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue