Skip to content

Commit

Permalink
fix(gui): clear loading data after card leaves
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Jan 13, 2023
1 parent c36dadd commit 600ebae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions gui/src/components/LoadingCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ export function LoadingCard(props: LoadingCardProps) {
const pushHistory = useStore(mustExist(useContext(StateContext)), (state) => state.pushHistory);

const ready = useQuery('ready', () => 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
2 changes: 0 additions & 2 deletions gui/src/components/Txt2Img.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ export function Txt2Img(props: Txt2ImgProps) {
const setTxt2Img = useStore(state, (s) => s.setTxt2Img);
// eslint-disable-next-line @typescript-eslint/unbound-method
const setLoading = useStore(state, (s) => s.setLoading);
// eslint-disable-next-line @typescript-eslint/unbound-method
const pushHistory = useStore(state, (s) => s.pushHistory);

return <Box>
<Stack spacing={2}>
Expand Down

0 comments on commit 600ebae

Please sign in to comment.