fix(striker-ui): show Spinner until provision server data is received

main
Tsu-ba-me 3 years ago
parent 38d8081c72
commit bcfda2e37d
  1. 9
      striker-ui/components/ProvisionServerDialog.tsx

@ -996,6 +996,8 @@ const ProvisionServerDialog = ({
string[]
>([]);
const [isProvisionServerDataReady, setIsProvisionServerDataReady] =
useState<boolean>(false);
const [isOpenProvisionConfirmDialog, setIsOpenProvisionConfirmDialog] =
useState<boolean>(false);
const [isProvisionRequestInProgress, setIsProvisionRequestInProgress] =
@ -1510,6 +1512,8 @@ const ProvisionServerDialog = ({
};
}),
);
setIsProvisionServerDataReady(true);
});
}, [initLimits]);
@ -1538,6 +1542,7 @@ const ProvisionServerDialog = ({
<CloseIcon />
</IconButton>
</PanelHeader>
{isProvisionServerDataReady ? (
<Box
sx={{
display: 'flex',
@ -1732,6 +1737,10 @@ const ProvisionServerDialog = ({
value={inputOptimizeForOSValue}
/>
</Box>
) : (
<Spinner />
)}
<Box
sx={{
display: 'flex',

Loading…
Cancel
Save