mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2025-05-16 19:38:40 +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>([]);
|
useState<StudentStatusListType>([]);
|
||||||
// Student Status List
|
// Student Status List
|
||||||
const StudentStatusListQuery = useQuery({
|
const StudentStatusListQuery = useQuery({
|
||||||
enabled: studying,
|
enabled: studying && !StudentStatusQuery.isLoading,
|
||||||
queryKey: ["user_status_list"],
|
queryKey: ["user_status_list"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const data = await GetStudentStatusListNear();
|
const data = await GetStudentStatusListNear();
|
||||||
|
@ -260,7 +260,7 @@ export default function Home() {
|
||||||
useState<StudentStatusListType>([]);
|
useState<StudentStatusListType>([]);
|
||||||
// Student Status List Global
|
// Student Status List Global
|
||||||
const StudentStatusListGlobalQuery = useQuery({
|
const StudentStatusListGlobalQuery = useQuery({
|
||||||
enabled: !studying,
|
enabled: !studying && !StudentStatusQuery.isLoading,
|
||||||
queryKey: ["user_status_list_global"],
|
queryKey: ["user_status_list_global"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const data = await GetStudentStatusList();
|
const data = await GetStudentStatusList();
|
||||||
|
@ -291,7 +291,7 @@ export default function Home() {
|
||||||
const [study_groups, setStudyGroups] = useState<StudyGroupType[]>([]);
|
const [study_groups, setStudyGroups] = useState<StudyGroupType[]>([]);
|
||||||
// Study Group List
|
// Study Group List
|
||||||
const StudyGroupQuery = useQuery({
|
const StudyGroupQuery = useQuery({
|
||||||
enabled: studying,
|
enabled: studying && !StudentStatusQuery.isLoading,
|
||||||
queryKey: ["study_group_list"],
|
queryKey: ["study_group_list"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const data = await GetStudyGroupListFiltered();
|
const data = await GetStudyGroupListFiltered();
|
||||||
|
@ -319,7 +319,7 @@ export default function Home() {
|
||||||
>([]);
|
>([]);
|
||||||
// Study Group Global List
|
// Study Group Global List
|
||||||
const StudyGroupGlobalQuery = useQuery({
|
const StudyGroupGlobalQuery = useQuery({
|
||||||
enabled: !studying,
|
enabled: !studying && !StudentStatusQuery.isLoading,
|
||||||
queryKey: ["study_group_list_global"],
|
queryKey: ["study_group_list_global"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const data = await GetStudyGroupList();
|
const data = await GetStudyGroupList();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue