Possible fix to race conditions between queries in homepage which resulted in laggy rerenders of map

This commit is contained in:
Keannu Bernasol 2023-10-27 21:43:34 +08:00
parent bd42b5418e
commit 88d8ce05b8

View file

@ -381,12 +381,14 @@ export default function Home() {
</>
);
} else if (
(StudentStatusQuery.isFetching && studying) ||
StudentStatusListQuery.isFetching ||
StudyGroupQuery.isFetching ||
(StudentStatusQuery.isFetching && !studying) ||
StudentStatusListGlobalQuery.isFetching ||
StudyGroupGlobalQuery.isFetching
(!StudentStatusQuery.isSuccess &&
studying &&
!StudentStatusListQuery.isSuccess &&
!StudyGroupQuery.isSuccess &&
!StudentStatusQuery.isSuccess) ||
(!studying &&
!StudentStatusListGlobalQuery.isSuccess &&
!StudyGroupGlobalQuery.isSuccess)
) {
return (
<>