fix(gui): clear loading data after card leaves
This commit is contained in:
parent
c36daddf66
commit
600ebae73a
|
@ -20,6 +20,8 @@ export function LoadingCard(props: LoadingCardProps) {
|
||||||
const pushHistory = useStore(mustExist(useContext(StateContext)), (state) => state.pushHistory);
|
const pushHistory = useStore(mustExist(useContext(StateContext)), (state) => state.pushHistory);
|
||||||
|
|
||||||
const ready = useQuery('ready', () => client.ready(props.loading), {
|
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,
|
refetchInterval: POLL_TIME,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -43,8 +43,6 @@ export function Txt2Img(props: Txt2ImgProps) {
|
||||||
const setTxt2Img = useStore(state, (s) => s.setTxt2Img);
|
const setTxt2Img = useStore(state, (s) => s.setTxt2Img);
|
||||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
||||||
const setLoading = useStore(state, (s) => s.setLoading);
|
const setLoading = useStore(state, (s) => s.setLoading);
|
||||||
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
||||||
const pushHistory = useStore(state, (s) => s.pushHistory);
|
|
||||||
|
|
||||||
return <Box>
|
return <Box>
|
||||||
<Stack spacing={2}>
|
<Stack spacing={2}>
|
||||||
|
|
Loading…
Reference in New Issue