fix(gui): query for each loading image separately
This commit is contained in:
parent
7181d62fba
commit
0eee464891
|
@ -29,7 +29,7 @@ export function LoadingCard(props: LoadingCardProps) {
|
||||||
const setReady = useStore(state, (s) => s.setReady);
|
const setReady = useStore(state, (s) => s.setReady);
|
||||||
|
|
||||||
const cancel = useMutation(() => client.cancel(props.loading));
|
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
|
// data will always be ready without this, even if the API says its not
|
||||||
cacheTime: 0,
|
cacheTime: 0,
|
||||||
refetchInterval: POLL_TIME,
|
refetchInterval: POLL_TIME,
|
||||||
|
@ -90,7 +90,7 @@ export function LoadingCard(props: LoadingCardProps) {
|
||||||
sx={{ alignItems: 'center' }}
|
sx={{ alignItems: 'center' }}
|
||||||
>
|
>
|
||||||
{renderProgress()}
|
{renderProgress()}
|
||||||
<Typography>{getProgress()} of {props.loading.params.steps}</Typography>
|
<Typography>{getProgress()}/{props.loading.params.steps} steps</Typography>
|
||||||
<Button onClick={() => cancel.mutate()}>Cancel</Button>
|
<Button onClick={() => cancel.mutate()}>Cancel</Button>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
Loading…
Reference in New Issue