1
0
Fork 0

fix(gui): query for each loading image separately

This commit is contained in:
Sean Sube 2023-02-04 12:46:49 -06:00
parent 7181d62fba
commit 0eee464891
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ export function LoadingCard(props: LoadingCardProps) {
const setReady = useStore(state, (s) => s.setReady);
const cancel = useMutation(() => client.cancel(props.loading));
const ready = useQuery('ready', () => client.ready(props.loading), {
const ready = useQuery(`ready-${props.loading.output.key}`, () => client.ready(props.loading), {
// data will always be ready without this, even if the API says its not
cacheTime: 0,
refetchInterval: POLL_TIME,
@ -90,7 +90,7 @@ export function LoadingCard(props: LoadingCardProps) {
sx={{ alignItems: 'center' }}
>
{renderProgress()}
<Typography>{getProgress()} of {props.loading.params.steps}</Typography>
<Typography>{getProgress()}/{props.loading.params.steps} steps</Typography>
<Button onClick={() => cancel.mutate()}>Cancel</Button>
</Stack>
</Box>