From a11c9dff657b4f294556ec2bfd117a554af11179 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 15 Oct 2023 12:35:53 +0800 Subject: [PATCH] Homepage loading improvements --- src/routes/Home/Home.tsx | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 3844e42..b0c2b5a 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -379,23 +379,23 @@ export default function Home() { ); + } else if ( + (StudentStatusQuery.isFetching && studying) || + StudentStatusListQuery.isFetching || + StudyGroupQuery.isFetching || + (StudentStatusQuery.isFetching && !studying) || + StudentStatusListGlobalQuery.isFetching || + StudyGroupGlobalQuery.isFetching + ) { + return ( + <> + + + Loading... + + ); } else if (dist && location) { - if ( - (StudentStatusQuery.isFetching && studying) || - StudentStatusListQuery.isFetching || - StudyGroupQuery.isFetching || - (StudentStatusQuery.isFetching && !studying) || - StudentStatusListGlobalQuery.isFetching || - StudyGroupGlobalQuery.isFetching - ) { - return ( - <> - - - Loading... - - ); - } else if (dist <= 1 || map_distance_override) { + if (dist <= 1 || map_distance_override) { return ( <>