diff --git a/gui/src/components/LoadingCard.tsx b/gui/src/components/LoadingCard.tsx index f05dcd0d..26186cf2 100644 --- a/gui/src/components/LoadingCard.tsx +++ b/gui/src/components/LoadingCard.tsx @@ -1,5 +1,6 @@ import { doesExist, mustExist } from '@apextoaster/js-utils'; import { Box, Button, Card, CardContent, CircularProgress, Typography } from '@mui/material'; +import { Stack } from '@mui/system'; import * as React from 'react'; import { useContext, useEffect } from 'react'; import { useMutation, useQuery } from 'react-query'; @@ -51,6 +52,14 @@ export function LoadingCard(props: LoadingCardProps) { return doesExist(ready.data) && ready.data.ready; } + function renderProgress() { + if (ready.status === 'success') { + return ; + } else { + return ; + } + } + useEffect(() => { if (cancel.status === 'success') { clearLoading(); @@ -75,9 +84,15 @@ export function LoadingCard(props: LoadingCardProps) { justifyContent: 'center', minHeight: params.height.default, }}> - - {getProgress()} of {props.loading.params.steps} - + + {renderProgress()} + {getProgress()} of {props.loading.params.steps} + + ;