mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2024-11-17 06:19:25 +08:00
Added potential fix to homepage map elements sometimes not rendering on startup
This commit is contained in:
parent
b0345dc2b7
commit
798c1a5e6b
1 changed files with 4 additions and 4 deletions
|
@ -228,7 +228,7 @@ export default function Home() {
|
|||
useState<StudentStatusListType>([]);
|
||||
// Student Status List
|
||||
const StudentStatusListQuery = useQuery({
|
||||
enabled: studying,
|
||||
enabled: studying && !StudentStatusQuery.isLoading,
|
||||
queryKey: ["user_status_list"],
|
||||
queryFn: async () => {
|
||||
const data = await GetStudentStatusListNear();
|
||||
|
@ -260,7 +260,7 @@ export default function Home() {
|
|||
useState<StudentStatusListType>([]);
|
||||
// Student Status List Global
|
||||
const StudentStatusListGlobalQuery = useQuery({
|
||||
enabled: !studying,
|
||||
enabled: !studying && !StudentStatusQuery.isLoading,
|
||||
queryKey: ["user_status_list_global"],
|
||||
queryFn: async () => {
|
||||
const data = await GetStudentStatusList();
|
||||
|
@ -291,7 +291,7 @@ export default function Home() {
|
|||
const [study_groups, setStudyGroups] = useState<StudyGroupType[]>([]);
|
||||
// Study Group List
|
||||
const StudyGroupQuery = useQuery({
|
||||
enabled: studying,
|
||||
enabled: studying && !StudentStatusQuery.isLoading,
|
||||
queryKey: ["study_group_list"],
|
||||
queryFn: async () => {
|
||||
const data = await GetStudyGroupListFiltered();
|
||||
|
@ -319,7 +319,7 @@ export default function Home() {
|
|||
>([]);
|
||||
// Study Group Global List
|
||||
const StudyGroupGlobalQuery = useQuery({
|
||||
enabled: !studying,
|
||||
enabled: !studying && !StudentStatusQuery.isLoading,
|
||||
queryKey: ["study_group_list_global"],
|
||||
queryFn: async () => {
|
||||
const data = await GetStudyGroupList();
|
||||
|
|
Loading…
Reference in a new issue