Skip to content

Commit

Permalink
fix(gui): query for each loading image separately
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 4, 2023
1 parent 7181d62 commit 0eee464
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gui/src/components/LoadingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 0eee464

Please sign in to comment.