diff --git a/src/_screens/home/detail-room-education/index.js b/src/_screens/home/detail-room-education/index.js index bb62427..8eb53b7 100644 --- a/src/_screens/home/detail-room-education/index.js +++ b/src/_screens/home/detail-room-education/index.js @@ -208,18 +208,30 @@ export default function DetailRoomEducation() { } useEffect(() => { - getDataStatisticCircle() - getListOrganization() - }, []) + const fetchData = async () => { + await getDataStatisticCircle(); + await getListOrganization(); + }; + + fetchData(); + }, []); useEffect(() => { - getDataStudentChart() - }, [dateStudentChart]) + const fetchStudentData = async () => { + await getDataStudentChart(); + }; + + fetchStudentData(); + }, [dateStudentChart]); useEffect(() => { - getDataTeacherChart() - }, [dateTeacherChart]) + const fetchTeacherData = async () => { + await getDataTeacherChart(); + }; + fetchTeacherData(); + }, [dateTeacherChart]); + useEffect(() => { if (isLoadingListOrganization || isLoadingStatisticCircle || isLoadingStudentChart || isLoadingTeacherChart) { $(".loading").removeClass("hide"); @@ -461,7 +473,7 @@ export default function DetailRoomEducation() {