diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index eaa3866..dadb0b2 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -363,22 +363,7 @@ export default function Home() { }); function CustomMap() { - if ( - (StudentStatusQuery.isFetching && studying) || - StudentStatusListQuery.isFetching || - StudyGroupQuery.isFetching || - (StudentStatusQuery.isFetching && !studying) || - StudentStatusListGlobalQuery.isFetching || - StudyGroupGlobalQuery.isFetching - ) { - return ( - <> - - - Loading... - - ); - } else if (!locationPermitted) { + if (!locationPermitted) { console.log(locationPermitted); return ( <> @@ -390,6 +375,22 @@ export default function Home() { ); } else if (dist && location && locationFetched) { if (dist <= 1 || map_distance_override) { + if ( + (StudentStatusQuery.isFetching && studying) || + StudentStatusListQuery.isFetching || + StudyGroupQuery.isFetching || + (StudentStatusQuery.isFetching && !studying) || + StudentStatusListGlobalQuery.isFetching || + StudyGroupGlobalQuery.isFetching + ) { + return ( + <> + + + Loading... + + ); + } return ( <>