1
0
Fork 0

fix(gui): clear loading data after card leaves

This commit is contained in:
Sean Sube 2023-01-12 21:20:25 -06:00
parent c36daddf66
commit 600ebae73a
2 changed files with 2 additions and 2 deletions

View File

@ -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,
});

View File

@ -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}>