Add simple loading state for switching instances

pull/74/head
Lim Chee Aun 2023-02-28 22:44:10 +08:00
rodzic 7cd78b8003
commit 3c7fc30444
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -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);
}