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 ( } else if (
(StudentStatusQuery.isFetching && studying) || (!StudentStatusQuery.isSuccess &&
StudentStatusListQuery.isFetching || studying &&
StudyGroupQuery.isFetching || !StudentStatusListQuery.isSuccess &&
(StudentStatusQuery.isFetching && !studying) || !StudyGroupQuery.isSuccess &&
StudentStatusListGlobalQuery.isFetching || !StudentStatusQuery.isSuccess) ||
StudyGroupGlobalQuery.isFetching (!studying &&
!StudentStatusListGlobalQuery.isSuccess &&
!StudyGroupGlobalQuery.isSuccess)
) { ) {
return ( return (
<> <>