Add simple loading state for switching instances

This commit is contained in:
Lim Chee Aun 2023-02-28 22:44:10 +08:00
parent 7cd78b8003
commit 3c7fc30444

View file

@ -646,7 +646,9 @@ function StatusPage() {
</p>
<button
type="button"
disabled={uiState === 'loading'}
onClick={() => {
setUIState('loading');
(async () => {
try {
const results =
@ -667,6 +669,7 @@ function StatusPage() {
throw new Error('No results');
}
} catch (e) {
setUIState('default');
alert('Error: ' + e);
console.error(e);
}