mirror of https://github.com/jetkvm/kvm.git
fix(Dialog): restore navigation after mount process completion (#274)
This commit is contained in:
parent
f30eb0355e
commit
f198df816c
|
@ -99,7 +99,6 @@ export function Dialog({ onClose }: { onClose: () => void }) {
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
setMountInProgress(false);
|
setMountInProgress(false);
|
||||||
navigate("..");
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -114,7 +113,7 @@ export function Dialog({ onClose }: { onClose: () => void }) {
|
||||||
clearMountMediaState();
|
clearMountMediaState();
|
||||||
syncRemoteVirtualMediaState()
|
syncRemoteVirtualMediaState()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
false;
|
navigate("..");
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
triggerError(err instanceof Error ? err.message : String(err));
|
triggerError(err instanceof Error ? err.message : String(err));
|
||||||
|
@ -124,7 +123,6 @@ export function Dialog({ onClose }: { onClose: () => void }) {
|
||||||
// and the modal exit animation for like 500ms
|
// and the modal exit animation for like 500ms
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setMountInProgress(false);
|
setMountInProgress(false);
|
||||||
navigate("..");
|
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -155,7 +153,6 @@ export function Dialog({ onClose }: { onClose: () => void }) {
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
setMountInProgress(false);
|
setMountInProgress(false);
|
||||||
navigate("..");
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue